[ 
https://issues.apache.org/jira/browse/GEODE-2282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15840613#comment-15840613
 ] 

ASF GitHub Bot commented on GEODE-2282:
---------------------------------------

Github user joeymcallister commented on a diff in the pull request:

    https://github.com/apache/geode/pull/366#discussion_r98112556
  
    --- Diff: 
geode-docs/developing/data_serialization/jsonformatter_pdxinstances.html.md.erb 
---
    @@ -44,3 +44,14 @@ After executing a Geode query or calling `region.get`, 
you can use the following
     -   `toJSONByteArray`. Reads a PdxInstance and returns a JSON byte array.
     
     For more information on using the JSONFormatter, see the Java API 
documentation for `org.apache.geode.pdx.JSONFormatter`.
    +
    +# Sorting Behavior of Serialized JSON Fields
    +
    +By default, Geode serialization creates a unique pdx typeID for each 
unique JSON document, even if the
    +only difference between the JSON documents is the order in which their 
fields are specified. 
    +
    +If you prefer that JSON documents which differ only in the order in which 
their fields are specified
    +map to the same typeID, set the property 
`gemfire.pdx.mapper.sort-json-field-names` to `true`. This
    +tells the system to sort the JSON fields prior to serialization, allowing 
the system to identify
    +matching entries, and helps reduce the number of pdx typIDs that are 
generated by the serialization
    --- End diff --
    
    Change "typIDs" to "typeIDs"


> Provide ability to sort field while creating pdxType for jSON document(Need 
> to document system property)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-2282
>                 URL: https://issues.apache.org/jira/browse/GEODE-2282
>             Project: Geode
>          Issue Type: Bug
>          Components: docs
>            Reporter: Hitesh Khamesra
>             Fix For: 1.1.0
>
>
> There is the possibility that same JSON document can create multiple pdxType 
> ids, if different JSON docs contain same fields in different order. Thus sort 
> those field while creating the pdxType id. Introduce system property to 
> enable this feature.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to