Class HumanReadableBytesSerializer
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonSerializer<HumanReadableBytes>
-
- org.apache.druid.java.util.common.HumanReadableBytesSerializer
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
public class HumanReadableBytesSerializer extends com.fasterxml.jackson.databind.JsonSerializer<HumanReadableBytes>
This serializer provides the basic support of JSON serialization ofHumanReadableBytes
to demonstrate serialization and deserialization work GivenHumanReadableBytes bytes = new HumanReadableBytes("1K");
will be serialized as 1000 instead of the raw input of 1K
-
-
Constructor Summary
Constructors Constructor Description HumanReadableBytesSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<HumanReadableBytes>
handledType()
void
serialize(HumanReadableBytes value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider)
-
-
-
Method Detail
-
serialize
public void serialize(HumanReadableBytes value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
- Specified by:
serialize
in classcom.fasterxml.jackson.databind.JsonSerializer<HumanReadableBytes>
- Throws:
IOException
-
handledType
public Class<HumanReadableBytes> handledType()
- Overrides:
handledType
in classcom.fasterxml.jackson.databind.JsonSerializer<HumanReadableBytes>
-
-