public class DefaultJsonSerializer extends Object implements JsonSerializer
JacksonJsonSerializer| Modifier and Type | Method and Description |
|---|---|
static DefaultJsonSerializer |
create()
Creates an instance without encryption support.
|
static DefaultJsonSerializer |
create(CryptoManager cryptoManager)
Creates an instance with optional encryption support.
|
<T> T |
deserialize(Class<T> target,
byte[] input)
Deserializes raw input into the target class.
|
<T> T |
deserialize(TypeRef<T> target,
byte[] input)
Deserializes raw input into the target type.
|
byte[] |
serialize(Object input)
Serializes the given input into its encoded byte array form.
|
public static DefaultJsonSerializer create()
public static DefaultJsonSerializer create(CryptoManager cryptoManager)
cryptoManager - (nullable) The manager to use for activating the
Encrypted annotation, or null to disable encryption support.public byte[] serialize(Object input)
JsonSerializerserialize in interface JsonSerializerinput - the object as input.public <T> T deserialize(Class<T> target, byte[] input)
JsonSerializerdeserialize in interface JsonSerializerT - the generic type to deserialize into.target - the target class.input - the raw input.public <T> T deserialize(TypeRef<T> target, byte[] input)
JsonSerializerdeserialize in interface JsonSerializerT - the type to deserialize into.target - the target type.input - the raw input.Copyright © 2020 Couchbase, Inc.. All rights reserved.