Skip to content
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

Support for JSON Binding API (JSON-B) [SPR-14923] #19490

Closed
spring-projects-issues opened this issue Nov 20, 2016 · 3 comments
Closed

Support for JSON Binding API (JSON-B) [SPR-14923] #19490

spring-projects-issues opened this issue Nov 20, 2016 · 3 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Nov 20, 2016

Juergen Hoeller opened SPR-14923 and commented

The JSON-B specification (part of Java EE 8, building on EE 7's JSON-P processing API) looks straightforward to integrate as an alternative to Jackson and Gson for JSON object binding, analogous to JAXB for XML binding. Let's aim for supporting it in Spring Framework 5, next to Servlet 4.0 and Bean Validation 2.0.

The JSON-B reference implementation - Yasson - originated within the Eclipse Persistence project but recently moved to a standalone home. It will probably be as commonly used as Hibernate Validator for the Bean Validation API, both standalone and as part of all major application servers.

http://json-b.net/
https://jcp.org/en/jsr/detail?id=367


Issue Links:

Referenced from: commits cf30603

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

There's a feature-complete M1 release of both the JSON-B API and the Yasson reference implementation now (which isn't the case with Servlet 4.0 and Bean Validation 2.0 yet). However, since neither the API nor the RI are likely to go GA before October, this still remains a 5.1 topic on our end.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Along with our recent support for the Servlet 4.0 preview API, let's see what we can do for JSON-B in time for our 5.0 GA still.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

After including our JsonbHttpMessageConverter in 5.0 snapshots for a few weeks now, we're building against the JSON-B API 1.0 M2 - corresponding to the spec's public final draft - now. This is what we'll ship our 5.0 RC1 against next week.

We do not include a JSON-B provider in our build at this point. We've tested against Eclipse Yasson (the RI) at 1.0 M1 level and are still waiting for a corresponding Yasson update to test against, hopefully still for RC1 or otherwise for RC2. Yasson's setup is a little bit complicated though, manually having to link in the underlying JSON-P RI, having a hard dependency on the CDI API (despite not using it), etc... so we are not likely to ever include it just for testing purposes. For the time being, our JsonbHttpMessageConverterTests remains deactivated.

As an alternative, there's also Apache Johnzon 1.1 as a combined JSON-P 1.1 + JSON-B 1.0 implementation, worth testing against once it ships:
https://lists.apache.org/thread.html/31c312cb031f9b7e71cd1a01f43edded2d03e9605ba36c3eb51cca33@%3Cdev.johnzon.apache.org%3E

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants