Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-5112

As a user I would like my JSON documents to be integrated better with my POJOs



    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: rest (dev)
    • Labels:


      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.




            • Assignee:
              bschuchardt Bruce J Schuchardt
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: