|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.fge.jsonpatch.mergepatch.JsonMergePatch
public abstract class JsonMergePatch
Implementation of JSON merge patch
Unlike JSON Patch, JSON Merge Patch only applies to JSON Objects or JSON arrays.
| Field Summary | |
|---|---|
protected static MessageBundle |
BUNDLE
|
protected static JsonNodeFactory |
FACTORY
|
protected JsonNode |
origPatch
|
| Constructor Summary | |
|---|---|
protected |
JsonMergePatch(JsonNode node)
Protected constructor |
| Method Summary | |
|---|---|
abstract JsonNode |
apply(JsonNode input)
|
protected static JsonNode |
clearNulls(JsonNode node)
Clear "null values" from a JSON value |
static JsonMergePatch |
fromJson(JsonNode input)
|
void |
serialize(JsonGenerator jgen,
SerializerProvider provider)
|
void |
serializeWithType(JsonGenerator jgen,
SerializerProvider provider,
TypeSerializer typeSer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final JsonNodeFactory FACTORY
protected static final MessageBundle BUNDLE
protected final JsonNode origPatch
| Constructor Detail |
|---|
protected JsonMergePatch(JsonNode node)
Only necessary for serialization purposes. The patching process itself never requires the full node to operate.
node - the original patch node| Method Detail |
|---|
public abstract JsonNode apply(JsonNode input)
throws JsonPatchException
JsonPatchException
public static JsonMergePatch fromJson(JsonNode input)
throws JsonPatchException
JsonPatchExceptionprotected static JsonNode clearNulls(JsonNode node)
Non container values are unchanged. For arrays, null elements are removed. From objects, members whose values are null are removed.
This method is recursive, therefore arrays within objects, or objects within arrays, or arrays within arrays etc are also affected.
node - the original JSON value
public final void serialize(JsonGenerator jgen,
SerializerProvider provider)
throws IOException
serialize in interface JsonSerializableIOException
public final void serializeWithType(JsonGenerator jgen,
SerializerProvider provider,
TypeSerializer typeSer)
throws IOException
serializeWithType in interface JsonSerializableIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||