Package com.hpe.caf.codec
Class JsonCodec
- java.lang.Object
-
- com.hpe.caf.codec.JsonCodec
-
@FileExtensions({"","json"}) public class JsonCodec extends Object implements Codec
Implementation of Codec that supports serialisation and deserialisation to and form JSON format.
-
-
Constructor Summary
Constructors Constructor Description JsonCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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[]serialise(Object object)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.hpe.caf.api.Codec
deserialise, deserialise
-
-
-
-
Method Detail
-
deserialise
public <T> T deserialise(byte[] data, Class<T> clazz, DecodeMethod method) throws CodecException- 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
public byte[] serialise(Object object) throws CodecException
- Specified by:
serialisein interfaceCodec- Throws:
CodecException
-
getMapper
protected com.fasterxml.jackson.databind.ObjectMapper getMapper(DecodeMethod method)
-
-