public interface SerializerAdapter
| Modifier and Type | Method and Description |
|---|---|
<U> U |
deserialize(HttpHeaders headers,
Type type)
Deserialize the provided headers returned from a REST API to an entity instance declared as
the model to hold 'Matching' headers.
|
<U> U |
deserialize(String value,
Type type,
SerializerEncoding encoding)
Deserializes a string into a
U object. |
String |
serialize(Object object,
SerializerEncoding encoding)
Serializes an object into a string.
|
String |
serializeList(List<?> list,
CollectionFormat format)
Serializes a list into a string with the delimiter specified with the
Swagger collection format joining each individual serialized items in
the list.
|
String |
serializeRaw(Object object)
Serializes an object into a raw string.
|
String serialize(Object object, SerializerEncoding encoding) throws IOException
object - the object to serializeencoding - the encoding to use for serializationIOException - exception from serializationString serializeRaw(Object object)
object - the object to serializeString serializeList(List<?> list, CollectionFormat format)
list - the list to serializeformat - the Swagger collection format<U> U deserialize(String value, Type type, SerializerEncoding encoding) throws IOException
U object.U - the type of the deserialized objectvalue - the string value to deserializetype - the type to deserializeencoding - the encoding used in the serialized valueIOException - exception from deserialization<U> U deserialize(HttpHeaders headers, Type type) throws IOException
HeaderCollection annotation applied to
the properties in the entity.ResponseBase returned by java proxy method corresponding to the REST API.
e.g.
Mono<RestResponseBase<FooMetadataHeaders, Void>> getMetadata(args);
class FooMetadataHeaders {
String name;
{@literal @}HeaderCollection("header-collection-prefix-")
Map<String,String> headerCollection;
}
in the case of above example, this method produces an instance of FooMetadataHeaders from provided
headers.U - the type of the deserialized objectheaders - the REST API returned headerstype - the type to deserializeheaders, if header entity model does
not exists then return nullIOException - If an I/O error occursCopyright © 2020 Microsoft Corporation. All rights reserved.