Package com.github.fge.jsonpatch
Class JsonPatchFactory
- java.lang.Object
-
- com.github.fge.jsonpatch.JsonPatchFactory
-
public class JsonPatchFactory extends Object
A JsonPatchFactory is able to create a JsonPatch from a JsonNode.
-
-
Field Summary
Fields Modifier and Type Field Description protected static com.github.fge.msgsimple.bundle.MessageBundleBUNDLEprotected com.fasterxml.jackson.databind.ObjectMappermapperprotected com.fasterxml.jackson.databind.ObjectReaderreaderprotected com.fasterxml.jackson.databind.ObjectWriterwriter
-
Constructor Summary
Constructors Constructor Description JsonPatchFactory(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonPatchfromJson(com.fasterxml.jackson.databind.JsonNode node)Builds a JSON Patch out of a JSON representation with support for an extended set of JSON patch operationscom.fasterxml.jackson.databind.ObjectReadergetReader()com.fasterxml.jackson.databind.ObjectWritergetWriter()
-
-
-
Field Detail
-
BUNDLE
protected static final com.github.fge.msgsimple.bundle.MessageBundle BUNDLE
-
mapper
protected final com.fasterxml.jackson.databind.ObjectMapper mapper
-
reader
protected final com.fasterxml.jackson.databind.ObjectReader reader
-
writer
protected final com.fasterxml.jackson.databind.ObjectWriter writer
-
-
Method Detail
-
getReader
public com.fasterxml.jackson.databind.ObjectReader getReader()
-
getWriter
public com.fasterxml.jackson.databind.ObjectWriter getWriter()
-
fromJson
public JsonPatch fromJson(com.fasterxml.jackson.databind.JsonNode node) throws IOException
Builds a JSON Patch out of a JSON representation with support for an extended set of JSON patch operations- Parameters:
node- the JSON representation of the generated JSON Patch- Returns:
- a JSON Patch
- Throws:
IOException- input is not a valid JSON patchNullPointerException- input is null
-
-