public class HumanReadableBytesSerializer extends com.fasterxml.jackson.databind.JsonSerializer<HumanReadableBytes>
HumanReadableBytes
to demonstrate serialization and deserialization work
Given
HumanReadableBytes bytes = new HumanReadableBytes("1K");
will be serialized as 1000 instead of the raw input of 1K| Constructor and Description |
|---|
HumanReadableBytesSerializer() |
| Modifier and Type | Method and Description |
|---|---|
Class<HumanReadableBytes> |
handledType() |
void |
serialize(HumanReadableBytes value,
com.fasterxml.jackson.core.JsonGenerator jgen,
com.fasterxml.jackson.databind.SerializerProvider provider) |
public void serialize(HumanReadableBytes value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
serialize in class com.fasterxml.jackson.databind.JsonSerializer<HumanReadableBytes>IOExceptionpublic Class<HumanReadableBytes> handledType()
handledType in class com.fasterxml.jackson.databind.JsonSerializer<HumanReadableBytes>Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.