Interface JsonSerializer
- All Superinterfaces:
JsonSerializer
,ObjectSerializer
Generic interface covering basic JSON serialization and deserialization methods.
-
Method Summary
Modifier and TypeMethodDescription<T> T
deserializeTree
(JsonNode jsonNode, TypeReference<T> typeReference) Reads a JSON tree into its object representation.<T> Mono<T>
deserializeTreeAsync
(JsonNode jsonNode, TypeReference<T> typeReference) Reads a JSON tree into its object representation.void
serializeTree
(OutputStream stream, JsonNode jsonNode) Writes a JSON tree into a stream.serializeTreeAsync
(OutputStream stream, JsonNode jsonNode) Writes a JSON tree into a stream.toTree
(InputStream stream) Reads a JSON stream into its JSON tree representation.Writes an object into its JSON tree representation.toTreeAsync
(InputStream stream) Reads a JSON stream into its JSON tree representation.toTreeAsync
(Object value) Writes an object into its JSON tree representation.Methods inherited from interface com.azure.core.util.serializer.JsonSerializer
deserialize, deserializeAsync, deserializeFromBytes, deserializeFromBytesAsync, serialize, serializeAsync, serializeToBytes, serializeToBytesAsync
-
Method Details
-
deserializeTree
Reads a JSON tree into its object representation.- Type Parameters:
T
- Type of the object.- Parameters:
jsonNode
- The JSON tree.typeReference
-TypeReference
representing the object.- Returns:
- The object represented by the deserialized JSON tree.
-
deserializeTreeAsync
Reads a JSON tree into its object representation.- Type Parameters:
T
- Type of the object.- Parameters:
jsonNode
- The JSON tree.typeReference
-TypeReference
representing the object.- Returns:
- The object represented by the deserialized JSON tree.
-
serializeTree
Writes a JSON tree into a stream.- Parameters:
stream
-OutputStream
where the JSON tree will be written.jsonNode
- The JSON tree.
-
serializeTreeAsync
Writes a JSON tree into a stream.- Parameters:
stream
-OutputStream
where the JSON tree will be written.jsonNode
- The JSON tree.- Returns:
- Reactive stream that will indicate operation completion.
-
toTree
Reads a JSON stream into its JSON tree representation.- Parameters:
stream
- JSON stream.- Returns:
- The JSON tree representing the deserialized JSON byte array.
-
toTreeAsync
Reads a JSON stream into its JSON tree representation.- Parameters:
stream
- JSON stream.- Returns:
- The JSON tree representing the deserialized JSON byte array.
-
toTree
Writes an object into its JSON tree representation.- Parameters:
value
- The object.- Returns:
- The JSON tree representing the object.
-
toTreeAsync
Writes an object into its JSON tree representation.- Parameters:
value
- The object.- Returns:
- The JSON tree representing the object.
-