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

Use newer JSON-P & JSON-B standards as alternative to Jackson #29

Open
derekm opened this issue May 2, 2018 · 5 comments
Open

Use newer JSON-P & JSON-B standards as alternative to Jackson #29

derekm opened this issue May 2, 2018 · 5 comments

Comments

@derekm
Copy link

derekm commented May 2, 2018

Jackson is being obsoleted by JSON-P & JSON-B, and the Java community will be moving forward with the industry standards.

It would be nice to see JSON-P's JsonObject or JsonStructure used instead of Jackson's JsonNode.

It is also possible that adding in JSON-B could allow for typesafe population of POJOs from PostgreSQL jsonb columns, but I can't speak as to whether Hibernate could allow for this level of generics, although I would think it could.

@vladmihalcea
Copy link
Owner

That can be done. It only requires changing the JavaTypeDescriptor. However, I have no time to do it now.

@derekm
Copy link
Author

derekm commented May 4, 2018

I may try to carve out some time to assist!

@vladmihalcea
Copy link
Owner

Cool, thanks

@jwgmeligmeyling
Copy link
Contributor

jwgmeligmeyling commented Jul 10, 2019

The JSON-P equivalent for JsonNode seems to be JsonValue instead of JsonStructure. However, just swapping out the implementation of Jackson with JSON-B/JSON-P will mean that any users that rely on JsonNode serialisation, serialization of beans mapped with Jackson annotations, or users that provide a custom ObjectMapper will run into compatibility issues. Therefore the JSON-B/JSON-P alternative should probably use a different type name and live under a different package.

@vladmihalcea What is your preference w.r.t. the new type names and package name for the JSON-B/JSON-P types?

I've done some initial testing with swapping out Jackson for JsonB/P. Most of the tests are passing but it obviously still needs the aforementioned structural rework: master...JWGmeligMeyling:feature/29

Note: some users may also like that the JsonValue implementations are Serializable: #25

@vladmihalcea
Copy link
Owner

I new type would be fine for JSON-P, like jsonb-p and json-p. The new type will not use Jackson, so it should not affect users that mapped JsonNode on their entities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants