com.github.fge.jsonpatch.mergepatch
Class JsonMergePatchDeserializer

java.lang.Object
  extended by com.fasterxml.jackson.databind.JsonDeserializer<JsonMergePatch>
      extended by com.github.fge.jsonpatch.mergepatch.JsonMergePatchDeserializer

public final class JsonMergePatchDeserializer
extends JsonDeserializer<JsonMergePatch>

Custom JsonDeserializer for JsonMergePatch instances

Unlike "real" JSON Patches (ie, as defined by RFC 6902), JSON merge patch instances are "free form", they can be either JSON arrays or JSON objects without any restriction on the contents; only the content itself may guide the patching process (null elements in arrays, null values in objects).

Jackson does not provide a deserializer for such a case; we therefore write our own here.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
JsonDeserializer.None
 
Constructor Summary
JsonMergePatchDeserializer()
           
 
Method Summary
 JsonMergePatch deserialize(JsonParser jp, DeserializationContext ctxt)
           
 
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, unwrappingDeserializer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonMergePatchDeserializer

public JsonMergePatchDeserializer()
Method Detail

deserialize

public JsonMergePatch deserialize(JsonParser jp,
                                  DeserializationContext ctxt)
                           throws IOException
Specified by:
deserialize in class JsonDeserializer<JsonMergePatch>
Throws:
IOException