If you treat your JSON objects as if they were conforming to a common schema, always place the fields in the same order and always provide all the fields and set fields to appropriate null values as necessary you will not generate as many permutations of PDX types. This will guarantee that there will only be one PDX type created for all of the objects that match that schema.
Example :
Given an example like this:
{
"name":"John",
"age":30,
"car":"Ford"
}
If George DOESN’T HAVE a car do this:
{
"name":"George",
"age":24,
"car":null
}
rather than this:
{
"name":"George",
"age":24
}
And most importantly, keep the fields ordered the same. In other words don’t do this:
{
"name":"John",
"age":30,
"car":"Ford"
}
{
"age":24,
"name":"George",
"car":null
}
For further info, please refer
https://gemfire.docs.pivotal.io/98/geode/developing/data_serialization/jsonformatter_pdxinstances.html