Class JacksonAdapter
java.lang.Object
com.azure.core.serializer.json.jackson.JacksonAdapter
- All Implemented Interfaces:
SerializerAdapter
Implementation of
SerializerAdapter that uses Jackson.
This is similar to JacksonAdapter found in the com.azure:azure-core package and will serve as the
long term replacement plan for the JacksonAdapter found in com.azure:azure-core.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SerializerAdaptermaintain singleton instance of the default serializer adapter.<T> Tdeserialize(byte[] bytes, Type type, SerializerEncoding encoding) <T> Tdeserialize(HttpHeaders headers, Type deserializedHeadersType) <T> Tdeserialize(InputStream inputStream, Type type, SerializerEncoding encoding) <T> Tdeserialize(String value, Type type, SerializerEncoding encoding) <T> TdeserializeHeader(Header header, Type type) serialize(Object object, SerializerEncoding encoding) voidserialize(Object object, SerializerEncoding encoding, OutputStream outputStream) serializeList(List<?> list, CollectionFormat format) serializeRaw(Object object) byte[]serializeToBytes(Object object, SerializerEncoding encoding) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.core.util.serializer.SerializerAdapter
serializeIterable
-
Method Details
-
defaultSerializerAdapter
maintain singleton instance of the default serializer adapter.- Returns:
- the default serializer
-
serialize
- Specified by:
serializein interfaceSerializerAdapter- Throws:
IOException
-
serializeToBytes
- Specified by:
serializeToBytesin interfaceSerializerAdapter- Throws:
IOException
-
serialize
public void serialize(Object object, SerializerEncoding encoding, OutputStream outputStream) throws IOException - Specified by:
serializein interfaceSerializerAdapter- Throws:
IOException
-
serializeRaw
- Specified by:
serializeRawin interfaceSerializerAdapter
-
serializeList
- Specified by:
serializeListin interfaceSerializerAdapter
-
deserialize
- Specified by:
deserializein interfaceSerializerAdapter- Throws:
IOException
-
deserialize
- Specified by:
deserializein interfaceSerializerAdapter- Throws:
IOException
-
deserialize
public <T> T deserialize(InputStream inputStream, Type type, SerializerEncoding encoding) throws IOException - Specified by:
deserializein interfaceSerializerAdapter- Throws:
IOException
-
deserialize
- Specified by:
deserializein interfaceSerializerAdapter- Throws:
IOException
-
deserializeHeader
- Specified by:
deserializeHeaderin interfaceSerializerAdapter- Throws:
IOException
-