John Blum created GEODE-8255:
--------------------------------
Summary: 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
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)