public static byte[] toJSONByteArray(PdxInstance pdxInstance) {
    return new JSONFormatter().toJsonByteArrayFromPdxInstance(pdxInstance);
  }
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