private JSONToPdxMapper createJSONToPdxMapper(String className, JSONToPdxMapper parent,
      String... identityFields) {
    if (Boolean.getBoolean(SORT_JSON_FIELD_NAMES_PROPERTY)) {
      return new PdxInstanceSortedHelper(className, parent, identityFields);
    } else {
      return new PdxInstanceHelper(className, parent, identityFields);
    }
  }
Converts a PdxInstance into a JSON document in byte-array form

@param pdxInstance The PdxInstance to convert
@return the JSON byte array
@throws JSONFormatterException if unable to create the JSON document
geode-core/src/main/java/org/apache/geode/pdx/JSONFormatter.java