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

[OPTIONAL] Consider replacing JSONFormatter with a new PdxJsonObjectMapper #83

Open
jxblum opened this issue May 13, 2020 · 0 comments
Open

Comments

@jxblum
Copy link
Contributor

jxblum commented May 13, 2020

Currently, the Apache Geode JSONFormatter class (source) and PdxInstance types (e.g. PdxInstanceImpl) has the following problems:

  • JSONFormatter cannot handle (top-level) JSON arrays
  • JSONFormatter cannot handle JSON type metadata (when activating Jackson ObjectMapper default typing)
  • JSONFormatter with PdxInstance(Impl) loses type metadata, id, among other things: Object (using PDX serializer) -> PDX (using JSONFormatter.toJSON(:PdxInstance)) -> JSON (using JSONFormatter.fromJSON(..)) -> PDX (using PdxInstance.getObject()) -> PdxInstance (expect Object here)
  • PdxInstance.getObject() cannot handle Java 8 types in general (e.g. Optional), JSR-310 (Time) types in particular, and parameter names even though Jackson does
  • I suspect Apache Geode will not work with Jackson 3, which is based on Java 8 by default, due to serialization issues
  • PDX is not properly extensible (e.g. you cannot "configure" the static ObjectMapper used by PdxInstanceImpl in the getObject() method, which is blocker issue for many JSON doc types).
@jxblum jxblum changed the title Consider replacing JSONFormatter with a new PdxJsonObjectMapper [OPTIONAL] Consider replacing JSONFormatter with a new PdxJsonObjectMapper Aug 5, 2023
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

1 participant