Class HllSketchJsonDeserialiser

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.deser.NullValueProvider

    public class HllSketchJsonDeserialiser
    extends com.fasterxml.jackson.databind.JsonDeserializer<org.apache.datasketches.hll.HllSketch>
    A HllSketchJsonDeserialiser deserialises HllSketch objects. Custom objects are now supported in the values list. This includes the custom Gaffer types, such as TypeSubTypeValue, TypeValue, CustomMap and FreqMap. The only stipulation is that the class must be included in the fields of the JSON object. This means your custom type will need the following Jackson annotation or it will be ignored during deserialisation:
     @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "class")
     

    NOTE: the toString method is called by the HllSketchWithValues class when deserialising the values so you need to ensure that the toString method is overridden by your object.

    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        com.fasterxml.jackson.databind.JsonDeserializer.None
    • 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
    • Constructor Detail

      • HllSketchJsonDeserialiser

        public HllSketchJsonDeserialiser()
    • 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 class com.fasterxml.jackson.databind.JsonDeserializer<org.apache.datasketches.hll.HllSketch>
        Throws:
        SerialisationException