Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Geode's handling of the "@type" field in a JSON document is poorly integrated with the PDX registry.
If I have a POJO class that is auto-serializable and I use this class name in my "@type" field of JSON document two different PDX types are created.
If my JSON document is deserialized Geode first converts the PdxInstance back into a JSON document and then uses a Jackson-databind ObjectMapper to convert it to my POJO class. That's very inefficient.
If my auto-serialized POJO is deserialized it uses much more efficient PDX deserialization to instantiate my object.
Why not look for "@type" when serializing my JSON document in the first place and use the class name to look up my existing PdxType in the registry? Use that PdxType to serialize the JSON document.
This is probably a lot harder than I imagine but the current JSON serialization seems bolted onto the PDX system and causes PdxType explosion if my documents are missing fields or has fields in different order. Tying my documents to my auto-serializable POJO class could help reign this in.