245 строки
20 KiB
YAML
245 строки
20 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.core.util.serializer.JacksonAdapter"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter"
|
|
name: "JacksonAdapter"
|
|
nameWithType: "JacksonAdapter"
|
|
summary: "Implementation of <xref uid=\"com.azure.core.util.serializer.SerializerAdapter\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SerializerAdapter\"></xref> for Jackson."
|
|
inheritances:
|
|
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
|
|
inheritedMembers:
|
|
- "java.lang.Object.clone()"
|
|
- "java.lang.Object.equals(java.lang.Object)"
|
|
- "java.lang.Object.finalize()"
|
|
- "java.lang.Object.getClass()"
|
|
- "java.lang.Object.hashCode()"
|
|
- "java.lang.Object.notify()"
|
|
- "java.lang.Object.notifyAll()"
|
|
- "java.lang.Object.toString()"
|
|
- "java.lang.Object.wait()"
|
|
- "java.lang.Object.wait(long)"
|
|
- "java.lang.Object.wait(long,int)"
|
|
syntax: "public class JacksonAdapter implements SerializerAdapter"
|
|
constructors:
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.JacksonAdapter()"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.JacksonAdapter()"
|
|
name: "JacksonAdapter()"
|
|
nameWithType: "JacksonAdapter.JacksonAdapter()"
|
|
summary: "Creates a new Jackson<wbr>Adapter instance with default mapper settings."
|
|
syntax: "public JacksonAdapter()"
|
|
desc: "Creates a new JacksonAdapter instance with default mapper settings."
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.JacksonAdapter(java.util.function.BiConsumer<com.fasterxml.jackson.databind.ObjectMapper,com.fasterxml.jackson.databind.ObjectMapper>)"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.JacksonAdapter(BiConsumer<ObjectMapper,ObjectMapper> configureSerialization)"
|
|
name: "JacksonAdapter(BiConsumer<ObjectMapper,ObjectMapper> configureSerialization)"
|
|
nameWithType: "JacksonAdapter.JacksonAdapter(BiConsumer<ObjectMapper,ObjectMapper> configureSerialization)"
|
|
summary: "Creates a new Jackson<wbr>Adapter instance with Azure Core mapper settings and applies additional configuration through `configureSerialization` callback."
|
|
parameters:
|
|
- description: "Applies additional configuration to outer mapper using inner mapper for module\n chaining."
|
|
name: "configureSerialization"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html\">BiConsumer</a><<xref href=\"com.fasterxml.jackson.databind.ObjectMapper?alt=com.fasterxml.jackson.databind.ObjectMapper&text=ObjectMapper\" data-throw-if-not-resolved=\"False\" />,<xref href=\"com.fasterxml.jackson.databind.ObjectMapper?alt=com.fasterxml.jackson.databind.ObjectMapper&text=ObjectMapper\" data-throw-if-not-resolved=\"False\" />>"
|
|
syntax: "public JacksonAdapter(BiConsumer<ObjectMapper,ObjectMapper> configureSerialization)"
|
|
desc: "Creates a new JacksonAdapter instance with Azure Core mapper settings and applies additional configuration through `configureSerialization` callback. `configureSerialization` callback provides outer and inner instances of <xref uid=\"com.fasterxml.jackson.databind.ObjectMapper\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ObjectMapper\"></xref>. Both of them are pre-configured for Azure serialization needs, but only outer mapper capable of flattening and populating additionalProperties. Outer mapper is used by `JacksonAdapter` for all serialization needs. Register modules on the outer instance to add custom (de)serializers similar to `new JacksonAdapter((outer, inner) -> outer.registerModule(new MyModule()))` Use inner mapper for chaining serialization logic in your (de)serializers."
|
|
methods:
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.<T>deserialize(byte[],java.lang.reflect.Type,com.azure.core.util.serializer.SerializerEncoding)"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.<T>deserialize(byte[] bytes, Type type, SerializerEncoding encoding)"
|
|
name: "<T>deserialize(byte[] bytes, Type type, SerializerEncoding encoding)"
|
|
nameWithType: "JacksonAdapter.<T>deserialize(byte[] bytes, Type type, SerializerEncoding encoding)"
|
|
summary: "Deserializes a byte array into an object."
|
|
parameters:
|
|
- name: "bytes"
|
|
type: "<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]"
|
|
- name: "type"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html\">Type</a>"
|
|
- name: "encoding"
|
|
type: "<xref href=\"com.azure.core.util.serializer.SerializerEncoding?alt=com.azure.core.util.serializer.SerializerEncoding&text=SerializerEncoding\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public T <T>deserialize(byte[] bytes, Type type, SerializerEncoding encoding)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
|
|
desc: "Deserializes a byte array into an object."
|
|
returns:
|
|
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.<T>deserialize(com.azure.core.http.HttpHeaders,java.lang.reflect.Type)"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.<T>deserialize(HttpHeaders headers, Type deserializedHeadersType)"
|
|
name: "<T>deserialize(HttpHeaders headers, Type deserializedHeadersType)"
|
|
nameWithType: "JacksonAdapter.<T>deserialize(HttpHeaders headers, Type deserializedHeadersType)"
|
|
summary: "Deserialize the provided headers returned from a REST API to an entity instance declared as the model to hold 'Matching' headers."
|
|
parameters:
|
|
- name: "headers"
|
|
type: "<xref href=\"com.azure.core.http.HttpHeaders?alt=com.azure.core.http.HttpHeaders&text=HttpHeaders\" data-throw-if-not-resolved=\"False\" />"
|
|
- name: "deserializedHeadersType"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html\">Type</a>"
|
|
syntax: "public T <T>deserialize(HttpHeaders headers, Type deserializedHeadersType)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
|
|
desc: "Deserialize the provided headers returned from a REST API to an entity instance declared as the model to hold 'Matching' headers.\n\n'Matching' headers are the REST API returned headers those with:\n\n1. header names same as name of a properties in the entity.\n2. header names start with value of <xref uid=\"com.azure.core.annotation.HeaderCollection\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.core.annotation.HeaderCollection\"></xref> annotation applied to the properties in the entity.\n\nWhen needed, the 'header entity' types must be declared as first generic argument of <xref uid=\"com.azure.core.http.rest.ResponseBase\" data-throw-if-not-resolved=\"false\" data-raw-source=\"com.azure.core.http.rest.ResponseBase\"></xref> returned by java proxy method corresponding to the REST API. e.g. `Mono> getMetadata(args);` `class FooMetadataHeaders { String name; {@literal @}HeaderCollection(\"header-collection-prefix-\") Map headerCollection; }` in the case of above example, this method produces an instance of FooMetadataHeaders from provided `headers`."
|
|
returns:
|
|
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.<T>deserialize(java.io.InputStream,java.lang.reflect.Type,com.azure.core.util.serializer.SerializerEncoding)"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.<T>deserialize(InputStream inputStream, Type type, SerializerEncoding encoding)"
|
|
name: "<T>deserialize(InputStream inputStream, Type type, SerializerEncoding encoding)"
|
|
nameWithType: "JacksonAdapter.<T>deserialize(InputStream inputStream, Type type, SerializerEncoding encoding)"
|
|
summary: "Deserializes a stream into an object."
|
|
parameters:
|
|
- name: "inputStream"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html\">InputStream</a>"
|
|
- name: "type"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html\">Type</a>"
|
|
- name: "encoding"
|
|
type: "<xref href=\"com.azure.core.util.serializer.SerializerEncoding?alt=com.azure.core.util.serializer.SerializerEncoding&text=SerializerEncoding\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public T <T>deserialize(InputStream inputStream, Type type, SerializerEncoding encoding)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
|
|
desc: "Deserializes a stream into an object."
|
|
returns:
|
|
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.<T>deserialize(java.lang.String,java.lang.reflect.Type,com.azure.core.util.serializer.SerializerEncoding)"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.<T>deserialize(String value, Type type, SerializerEncoding encoding)"
|
|
name: "<T>deserialize(String value, Type type, SerializerEncoding encoding)"
|
|
nameWithType: "JacksonAdapter.<T>deserialize(String value, Type type, SerializerEncoding encoding)"
|
|
summary: "Deserializes a string into an object."
|
|
parameters:
|
|
- name: "value"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- name: "type"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html\">Type</a>"
|
|
- name: "encoding"
|
|
type: "<xref href=\"com.azure.core.util.serializer.SerializerEncoding?alt=com.azure.core.util.serializer.SerializerEncoding&text=SerializerEncoding\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public T <T>deserialize(String value, Type type, SerializerEncoding encoding)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
|
|
desc: "Deserializes a string into an object."
|
|
returns:
|
|
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.<T>deserializeHeader(com.azure.core.util.Header,java.lang.reflect.Type)"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.<T>deserializeHeader(Header header, Type type)"
|
|
name: "<T>deserializeHeader(Header header, Type type)"
|
|
nameWithType: "JacksonAdapter.<T>deserializeHeader(Header header, Type type)"
|
|
summary: "Deserializes the provided header returned from a REST API to en entity instance declared as the model of the header."
|
|
parameters:
|
|
- name: "header"
|
|
type: "<xref href=\"com.azure.core.util.Header?alt=com.azure.core.util.Header&text=Header\" data-throw-if-not-resolved=\"False\" />"
|
|
- name: "type"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html\">Type</a>"
|
|
syntax: "public T <T>deserializeHeader(Header header, Type type)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
|
|
desc: "Deserializes the provided header returned from a REST API to en entity instance declared as the model of the header."
|
|
returns:
|
|
type: "<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.createDefaultSerializerAdapter()"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.createDefaultSerializerAdapter()"
|
|
name: "createDefaultSerializerAdapter()"
|
|
nameWithType: "JacksonAdapter.createDefaultSerializerAdapter()"
|
|
summary: "maintain singleton instance of the default serializer adapter."
|
|
modifiers:
|
|
- "static"
|
|
syntax: "public static SerializerAdapter createDefaultSerializerAdapter()"
|
|
desc: "maintain singleton instance of the default serializer adapter."
|
|
returns:
|
|
description: "the default serializer"
|
|
type: "<xref href=\"com.azure.core.util.serializer.SerializerAdapter?alt=com.azure.core.util.serializer.SerializerAdapter&text=SerializerAdapter\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.serialize(java.lang.Object,com.azure.core.util.serializer.SerializerEncoding)"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.serialize(Object object, SerializerEncoding encoding)"
|
|
name: "serialize(Object object, SerializerEncoding encoding)"
|
|
nameWithType: "JacksonAdapter.serialize(Object object, SerializerEncoding encoding)"
|
|
summary: "Serializes an object into a string."
|
|
parameters:
|
|
- name: "object"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
- name: "encoding"
|
|
type: "<xref href=\"com.azure.core.util.serializer.SerializerEncoding?alt=com.azure.core.util.serializer.SerializerEncoding&text=SerializerEncoding\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public String serialize(Object object, SerializerEncoding encoding)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
|
|
desc: "Serializes an object into a string."
|
|
returns:
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.serialize(java.lang.Object,com.azure.core.util.serializer.SerializerEncoding,java.io.OutputStream)"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.serialize(Object object, SerializerEncoding encoding, OutputStream outputStream)"
|
|
name: "serialize(Object object, SerializerEncoding encoding, OutputStream outputStream)"
|
|
nameWithType: "JacksonAdapter.serialize(Object object, SerializerEncoding encoding, OutputStream outputStream)"
|
|
summary: "Serializes an object and writes its output into an <xref uid=\"java.io.OutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OutputStream\"></xref>."
|
|
parameters:
|
|
- name: "object"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
- name: "encoding"
|
|
type: "<xref href=\"com.azure.core.util.serializer.SerializerEncoding?alt=com.azure.core.util.serializer.SerializerEncoding&text=SerializerEncoding\" data-throw-if-not-resolved=\"False\" />"
|
|
- name: "outputStream"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html\">OutputStream</a>"
|
|
syntax: "public void serialize(Object object, SerializerEncoding encoding, OutputStream outputStream)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
|
|
desc: "Serializes an object and writes its output into an <xref uid=\"java.io.OutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OutputStream\"></xref>."
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.serializeList(java.util.List<?>,com.azure.core.util.serializer.CollectionFormat)"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.serializeList(List<?> list, CollectionFormat format)"
|
|
name: "serializeList(List<?> list, CollectionFormat format)"
|
|
nameWithType: "JacksonAdapter.serializeList(List<?> list, CollectionFormat format)"
|
|
summary: "Serializes a list into a string with the delimiter specified with the Swagger collection format joining each individual serialized items in the list."
|
|
parameters:
|
|
- name: "list"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><?>"
|
|
- name: "format"
|
|
type: "<xref href=\"com.azure.core.util.serializer.CollectionFormat?alt=com.azure.core.util.serializer.CollectionFormat&text=CollectionFormat\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public String serializeList(List<?> list, CollectionFormat format)"
|
|
desc: "Serializes a list into a string with the delimiter specified with the Swagger collection format joining each individual serialized items in the list."
|
|
returns:
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.serializeRaw(java.lang.Object)"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.serializeRaw(Object object)"
|
|
name: "serializeRaw(Object object)"
|
|
nameWithType: "JacksonAdapter.serializeRaw(Object object)"
|
|
summary: "Serializes an object into a raw string, leading and trailing quotes will be trimmed."
|
|
parameters:
|
|
- name: "object"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
syntax: "public String serializeRaw(Object object)"
|
|
desc: "Serializes an object into a raw string, leading and trailing quotes will be trimmed."
|
|
returns:
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.serializeToBytes(java.lang.Object,com.azure.core.util.serializer.SerializerEncoding)"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.serializeToBytes(Object object, SerializerEncoding encoding)"
|
|
name: "serializeToBytes(Object object, SerializerEncoding encoding)"
|
|
nameWithType: "JacksonAdapter.serializeToBytes(Object object, SerializerEncoding encoding)"
|
|
summary: "Serializes an object into a byte array."
|
|
parameters:
|
|
- name: "object"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
- name: "encoding"
|
|
type: "<xref href=\"com.azure.core.util.serializer.SerializerEncoding?alt=com.azure.core.util.serializer.SerializerEncoding&text=SerializerEncoding\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public byte[] serializeToBytes(Object object, SerializerEncoding encoding)"
|
|
exceptions:
|
|
- type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html\">IOException</a>"
|
|
desc: "Serializes an object into a byte array."
|
|
returns:
|
|
type: "<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]"
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.serializer()"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.serializer()"
|
|
name: "serializer()"
|
|
nameWithType: "JacksonAdapter.serializer()"
|
|
deprecatedTag: "deprecated to avoid direct <xref uid=\"com.fasterxml.jackson.databind.ObjectMapper\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ObjectMapper\"></xref> usage in favor of using more resilient and debuggable <xref uid=\"com.azure.core.util.serializer.JacksonAdapter\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JacksonAdapter\"></xref> APIs."
|
|
syntax: "@Deprecated\npublic ObjectMapper serializer()"
|
|
hasDeprecatedTag: true
|
|
returns:
|
|
description: "the original serializer type."
|
|
type: "<xref href=\"com.fasterxml.jackson.databind.ObjectMapper?alt=com.fasterxml.jackson.databind.ObjectMapper&text=ObjectMapper\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.core.util.serializer.JacksonAdapter.simpleMapper()"
|
|
fullName: "com.azure.core.util.serializer.JacksonAdapter.simpleMapper()"
|
|
name: "simpleMapper()"
|
|
nameWithType: "JacksonAdapter.simpleMapper()"
|
|
summary: "Gets a static instance of <xref uid=\"com.fasterxml.jackson.databind.ObjectMapper\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ObjectMapper\"></xref> that doesn't handle flattening."
|
|
deprecatedTag: "deprecated, use `JacksonAdapter(BiConsumer )` constructor to configure modules."
|
|
modifiers:
|
|
- "protected"
|
|
syntax: "@Deprecated\nprotected ObjectMapper simpleMapper()"
|
|
desc: "Gets a static instance of <xref uid=\"com.fasterxml.jackson.databind.ObjectMapper\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ObjectMapper\"></xref> that doesn't handle flattening."
|
|
hasDeprecatedTag: true
|
|
returns:
|
|
description: "an instance of <xref uid=\"com.fasterxml.jackson.databind.ObjectMapper\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ObjectMapper\"></xref>."
|
|
type: "<xref href=\"com.fasterxml.jackson.databind.ObjectMapper?alt=com.fasterxml.jackson.databind.ObjectMapper&text=ObjectMapper\" data-throw-if-not-resolved=\"False\" />"
|
|
type: "class"
|
|
desc: "Implementation of <xref uid=\"com.azure.core.util.serializer.SerializerAdapter\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SerializerAdapter\"></xref> for Jackson."
|
|
implements:
|
|
- "<xref href=\"com.azure.core.util.serializer.SerializerAdapter?alt=com.azure.core.util.serializer.SerializerAdapter&text=SerializerAdapter\" data-throw-if-not-resolved=\"False\" />"
|
|
metadata: {}
|
|
package: "com.azure.core.util.serializer"
|
|
artifact: com.azure:azure-core:1.32.0
|