Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
None
-
None
Description
1. Maybe this could be a little "smarter". Maybe you have a DataMapperFactory or PDXDataMapperFactory. Then this could return you the correct dataMapper.
This is also a pattern that would allow us to be more extendable.
2. The add**Field method all follow a simple pattern... log method and field information add field to a field list
Could we not get a generic method out of this and instead of "copy paste" the same logic over and over again... rather call the generic method:
insertField(parentMethodName,fieldName,value,FieldType)
3. maybe a very niche "improvement" but could we be "smart" and order the fields in alphabetical AND maybe data types? In ReflectionPdxSerializer we try and do fixed length fields before we do variable length. Might be a "nice" improvement.
4. Maybe as part of a refactor the Factory can be held onto. According to the docs they are reusable and thread-safe.
An issue was opened. Fixed Drop
5. Maybe we can have a "getJSONParser(Object input)" method that would return a jsonParser. Then we can merge the two fromJson methods or at least not duplicate the internals.
Attachments
Issue Links
- relates to
-
GEODE-2282 Provide ability to sort field while creating pdxType for jSON document(Need to document system property)
- Closed