Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-2323

JSONFormatter refactor/improvements

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • None
    • serialization
    • 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

          Activity

            People

              Unassigned Unassigned
              hitesh.khamesra Hitesh Khamesra
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: