You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "John Blum (Jira)" <ji...@apache.org> on 2020/06/16 00:11:00 UTC

[jira] [Updated] (GEODE-8255) JSONFormatter does not properly generate the @type metadata field

     [ https://issues.apache.org/jira/browse/GEODE-8255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Blum updated GEODE-8255:
-----------------------------
    Labels: JSON-PDX  (was: )

> JSONFormatter does not properly generate the @type metadata field
> -----------------------------------------------------------------
>
>                 Key: GEODE-8255
>                 URL: https://issues.apache.org/jira/browse/GEODE-8255
>             Project: Geode
>          Issue Type: Improvement
>          Components: serialization
>            Reporter: John Blum
>            Priority: Major
>              Labels: JSON-PDX
>
> The Apache Geode [JSONFormatter|https://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/JSONFormatter.html] class is not symmetric.
> While it can parse JSON content and properly resolve JSON Objects as POJOs (from {{PdxInstance.getObject()}} when the {{@type}} metadata field is present in the JSON content, the {{JSONFormatter}} does not properly set the {{@type}} metadata field, particularly when a {{PdxInstance}} has a valid class name as determined by [PdxInstance.getClassName()|https://geode.apache.org/releases/latest/javadoc/org/apache/geode/pdx/PdxInstance.html#getClassName--].
> A test case illustrating this issue can be found [here|https://github.com/spring-projects/spring-boot-data-geode/blob/1.3.0.RELEASE/spring-geode/src/test/java/org/springframework/geode/data/json/JsonCacheDataImporterExporterIntegrationTests.java#L546-L580].



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