Interface JsonHandler


public interface JsonHandler
Handler for parsing and patching JSON objects
  • Method Summary

    Modifier and Type
    Method
    Description
    Serializes a plain language object to its JSON string representation.
    parse(String jsonString)
    Parses a JSON string into a platform specific representation.
    patch(Object existingObject, String jsonPatchString)
    Patches a platform specific JSON representation with an RFC 6902 JSON patch string.
  • Method Details

    • parse

      Object parse(String jsonString)
      Parses a JSON string into a platform specific representation.
      Parameters:
      jsonString - the string to parse
      Returns:
      a platform specific representation of the JSON object
    • patch

      Object patch(Object existingObject, String jsonPatchString)
      Patches a platform specific JSON representation with an RFC 6902 JSON patch string.
      Parameters:
      existingObject - the platform specific JSON representation
      jsonPatchString - the json patch string in RFC 6902 format
      Returns:
      a platform specific representation of the patched JSON object
    • format

      String format(Object obj)
      Serializes a plain language object to its JSON string representation.
      Parameters:
      obj - a plain language object
      Returns:
      a JSON string representation of the object
      Throws:
      Exception - if conversion fails