Package com.couchbase.client.java.codec
Interface JsonSerializer
- All Known Implementing Classes:
DefaultJsonSerializer,JacksonJsonSerializer,JsonValueSerializerWrapper
public interface JsonSerializer
The
JsonSerializer handles the serialization and deserialization of raw json data into java objects.-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> Tdeserialize(TypeRef<T> target, byte[] input) Deserializes raw input into the target type.<T> Tdeserialize(Class<T> target, byte[] input) Deserializes raw input into the target class.byte[]Serializes the given input into its encoded byte array form.
-
Method Details
-
serialize
Serializes the given input into its encoded byte array form.- Parameters:
input- the object as input.- Returns:
- the serialized output.
-
deserialize
Deserializes raw input into the target class.- Type Parameters:
T- the generic type to deserialize into.- Parameters:
target- the target class.input- the raw input.- Returns:
- the deserialized output.
-
deserialize
Deserializes raw input into the target type.- Type Parameters:
T- the type to deserialize into.- Parameters:
target- the target type.input- the raw input.- Returns:
- the deserialized output.
-