You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Michael Martell (Jira)" <ji...@apache.org> on 2019/12/09 23:44:00 UTC

[jira] [Created] (GEODE-7562) Fix Support for JSON Objects

Michael Martell created GEODE-7562:
--------------------------------------

             Summary: Fix Support for JSON Objects
                 Key: GEODE-7562
                 URL: https://issues.apache.org/jira/browse/GEODE-7562
             Project: Geode
          Issue Type: Bug
          Components: native client
            Reporter: Michael Martell


As a client developer, I need to be able to put/get JSON values of different types.

NC is supposed to support put/get of JSON-formatted objects using PDX and the class name "__GEMFIRE_JSON".  For a single value of JSON, this appears to work properly, but if there are more than one type with this class name, `region::get` breaks down.  The puts work, but when the values come back from the region the NC maps all of the values to the first type.

For instance, the JSON object "\{ foo: 'bar' }" is put in the region with key 1, then the value "\{ baz: 7 }" is put with key 2.  When get(key1) is called, you get back a PDX representation of "\{ foo: 'bar' }", but when get(key2) is called, instead of "\{ baz: 7}", you get back "\{ foo: }", i.e. one field, named foo, with no value, instead of one field named baz with value 7.

We believe the NC is using a map for types based on class name rather than type ID, but are not 100% certain yet what's specifically wrong.

 

Acceptance criteria:

i.  There is a new integration test which creates a region, puts two JSON values with different structures, gets them back, and compares the retrieved values to the originals.

ii. Said test is passing in the standard NC integration test suite.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)