Class JacksonJsonProvider
java.lang.Object
com.azure.core.serializer.json.jackson.JacksonJsonProvider
- All Implemented Interfaces:
com.azure.json.JsonProvider
Jackson-based implementation of
JsonProvider.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.azure.json.JsonReadercreateReader(byte[] json, com.azure.json.JsonOptions options) com.azure.json.JsonReadercreateReader(JsonParser parser) Creates an instance ofJsonReaderwrapping a JacksonJsonParser.com.azure.json.JsonReadercreateReader(InputStream json, com.azure.json.JsonOptions options) com.azure.json.JsonReadercreateReader(Reader json, com.azure.json.JsonOptions options) com.azure.json.JsonReadercreateReader(String json, com.azure.json.JsonOptions options) com.azure.json.JsonWritercreateWriter(JsonGenerator generator) Creates an instance ofJsonWriterwrapping a JacksonJsonGenerator.com.azure.json.JsonWritercreateWriter(OutputStream json, com.azure.json.JsonOptions options) com.azure.json.JsonWritercreateWriter(Writer json, com.azure.json.JsonOptions options) static ModuleReturns a Jackson DatabindModulethat allows forcom.azure.jsonimplementations to handle deserialization and serialization ofJsonSerializabletypes within a Jackson Databind context.
-
Constructor Details
-
JacksonJsonProvider
public JacksonJsonProvider()Creates an instance ofJacksonJsonProvider.
-
-
Method Details
-
createReader
public com.azure.json.JsonReader createReader(byte[] json, com.azure.json.JsonOptions options) throws IOException - Specified by:
createReaderin interfacecom.azure.json.JsonProvider- Throws:
IOException
-
createReader
public com.azure.json.JsonReader createReader(String json, com.azure.json.JsonOptions options) throws IOException - Specified by:
createReaderin interfacecom.azure.json.JsonProvider- Throws:
IOException
-
createReader
public com.azure.json.JsonReader createReader(InputStream json, com.azure.json.JsonOptions options) throws IOException - Specified by:
createReaderin interfacecom.azure.json.JsonProvider- Throws:
IOException
-
createReader
public com.azure.json.JsonReader createReader(Reader json, com.azure.json.JsonOptions options) throws IOException - Specified by:
createReaderin interfacecom.azure.json.JsonProvider- Throws:
IOException
-
createReader
Creates an instance ofJsonReaderwrapping a JacksonJsonParser.- Parameters:
parser- TheJsonParserparsing JSON.- Returns:
- A
JsonReaderwrapping theJsonParser. - Throws:
NullPointerException- Ifparseris null.
-
createWriter
public com.azure.json.JsonWriter createWriter(OutputStream json, com.azure.json.JsonOptions options) throws IOException - Specified by:
createWriterin interfacecom.azure.json.JsonProvider- Throws:
IOException
-
createWriter
public com.azure.json.JsonWriter createWriter(Writer json, com.azure.json.JsonOptions options) throws IOException - Specified by:
createWriterin interfacecom.azure.json.JsonProvider- Throws:
IOException
-
createWriter
Creates an instance ofJsonWriterwrapping a JacksonJsonGenerator.- Parameters:
generator- TheJsonGeneratorwriting JSON.- Returns:
- A
JsonWriterwrapping theJsonGenerator. - Throws:
NullPointerException- Ifgeneratoris null.
-
getJsonSerializableDatabindModule
Returns a Jackson DatabindModulethat allows forcom.azure.jsonimplementations to handle deserialization and serialization ofJsonSerializabletypes within a Jackson Databind context.Use the
Modulereturned by this method with your instance ofObjectMapperto have Jackson Databind supportJsonSerializabletypes.- Returns:
- A Jackson Databind
Modulethat handles deserialization and serialization ofJsonSerializabletypes.
-