-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JEE-8 - Json-B support #1053
Comments
From what I can tell, you could do this right now with a custom annotator as discussed in #524 . However, I've never used Json-B so I might be missing something. Your projects decisions are your own to make, but it is worth noting that the already implemented and supported library (jackson) does appear to out perform the JSON-B implementations (both johnzon and yasson) according to https://github.com/fabienrenaud/java-json-benchmark |
Since this is now a somewhat 'official' JSON binding API I think we should include a Json-B annotator in this project. |
If anyone wants to implement a Json-B annotator and submit a PR then please feel free. |
I would have usage for JSON-B-support for a project. Any chance that we'll see this feature in future? |
I've just provided a pull request for this, see: #1385. A little hint on how to use. JSON-B can map dates and times with apropriate anotation. I've seen listings with Date used as datatype, but they didn't work for me. Instead, LocalDate and the like did do the job. Code generation can already be configured to use them already, so that's what I suggest to do to other users. Another thing I noticed is that to my knowledge the json schema spec defines time and the time portion of date-time to be in same format by default. Yet the constants in FormatRule are defined differently in this regard, I believe the format in ISO_8601_DATETIME_FORMAT is right. Might need to be fixed, but seemed out of scope for my pull request. |
Please note, that |
I don't think I have used LocalDate anywhere in the code. By default, Date should be used. But one could specify LocalDate to be used in the plugin configuration. Ír you are on Java 8+ in your project, that should work while the plugin should remain independent. Although I am not sure if JSON-B will work on Java 6 properly, but that should not affect the plugin. |
Closed by #1385. |
Although the changes are merged to master, there's still no new release, so users can't use the new feature. Are there chances we see the next version any time soon? |
Does your library support Json-B or intends to support it?
If you don't or wont support it, how hard is it to get Json-B integrated?
We want to use it because it is the standard way of binding models to Json since JEE-8.
The text was updated successfully, but these errors were encountered: