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>AHllSketchJsonDeserialiserdeserialisesHllSketchobjects. Custom objects are now supported in the values list. This includes the custom Gaffer types, such asTypeSubTypeValue,TypeValue,CustomMapandFreqMap. The only stipulation is that theclassmust be included in the fields of theJSONobject. This means your custom type will need the followingJacksonannotationor it will be ignored during deserialisation:@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "class")NOTE: the
toStringmethod is called by theHllSketchWithValuesclass when deserialising thevaluesso you need to ensure that thetoStringmethod 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.HllSketchdeserialize(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:
deserializein classcom.fasterxml.jackson.databind.JsonDeserializer<org.apache.datasketches.hll.HllSketch>- Throws:
SerialisationException
-
-