Package com.caplin.streamlink
Interface JsonHandler
public interface JsonHandler
Handler for parsing and patching JSON objects
-
Method Summary
Modifier and TypeMethodDescriptionSerializes a plain language object to its JSON string representation.Parses a JSON string into a platform specific representation.Patches a platform specific JSON representation with an RFC 6902 JSON patch string.
-
Method Details
-
parse
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
Patches a platform specific JSON representation with an RFC 6902 JSON patch string.- Parameters:
existingObject
- the platform specific JSON representationjsonPatchString
- the json patch string in RFC 6902 format- Returns:
- a platform specific representation of the patched JSON object
-
format
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
-