Class HllSketchJsonDeserialiser
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonDeserializer<org.apache.datasketches.hll.HllSketch>
-
- uk.gov.gchq.gaffer.sketches.datasketches.cardinality.serialisation.json.HllSketchJsonDeserialiser
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider
public class HllSketchJsonDeserialiser extends com.fasterxml.jackson.databind.JsonDeserializer<org.apache.datasketches.hll.HllSketch>
AHllSketchJsonDeserialiser
deserialisesHllSketch
objects. Custom objects are now supported in the values list. This includes the custom Gaffer types, such asTypeSubTypeValue
,TypeValue
,CustomMap
andFreqMap
. The only stipulation is that theclass
must be included in the fields of theJSON
object. This means your custom type will need the followingJackson
annotation
or it will be ignored during deserialisation:@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "class")
NOTE: the
toString
method is called by theHllSketchWithValues
class when deserialising thevalues
so you need to ensure that thetoString
method is overridden by your object.
-
-
Constructor Summary
Constructors Constructor Description HllSketchJsonDeserialiser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.datasketches.hll.HllSketch
deserialize(com.fasterxml.jackson.core.JsonParser jsonParser, com.fasterxml.jackson.databind.DeserializationContext deserializationContext)
-
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
-
-
-
Method Detail
-
deserialize
public org.apache.datasketches.hll.HllSketch deserialize(com.fasterxml.jackson.core.JsonParser jsonParser, com.fasterxml.jackson.databind.DeserializationContext deserializationContext) throws SerialisationException
- Specified by:
deserialize
in classcom.fasterxml.jackson.databind.JsonDeserializer<org.apache.datasketches.hll.HllSketch>
- Throws:
SerialisationException
-
-