Package com.hpe.caf.codec
Class JsonCodec
java.lang.Object
com.hpe.caf.codec.JsonCodec
Implementation of Codec that supports serialisation and deserialisation to and form JSON format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Tdeserialise(byte[] data, Class<T> clazz, DecodeMethod method) <T> Tdeserialise(InputStream stream, Class<T> clazz, DecodeMethod method) protected com.fasterxml.jackson.databind.ObjectMappergetMapper(DecodeMethod method) byte[]Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hpe.caf.api.Codec
deserialise, deserialise
-
Constructor Details
-
JsonCodec
public JsonCodec()
-
-
Method Details
-
deserialise
- Specified by:
deserialisein interfaceCodec- Throws:
CodecException
-
deserialise
public <T> T deserialise(InputStream stream, Class<T> clazz, DecodeMethod method) throws CodecException - Specified by:
deserialisein interfaceCodec- Throws:
CodecException
-
serialise
- Specified by:
serialisein interfaceCodec- Throws:
CodecException
-
getMapper
-