JsonValueSerializerWrapper does not support decoding via TypeRef

Description

Community member anilb reports on the Couchbase Forums:

Looks starting from version 3.1.5 of the client the , when a customer json serializer is provided, the sdk is wrapping the serializer in JsonValueSerializerWrapper, and this did not have an implementation for the method that take a TypeRef object as input. This causing the above error.

<T> T deserialize(TypeRef<T> target, byte[] input)

the initialization code in ClusterEnvironment

private ClusterEnvironment(ClusterEnvironment.Builder builder) {
super(builder);
*this.jsonSerializer = (JsonSerializer)(builder.jsonSerializer != null ? new JsonValueSerializerWrapper(builder.jsonSerializer) : this.newDefaultSerializer(builder.cryptoManager));*
this.transcoder = (Transcoder)CbObjects.defaultIfNull(builder.transcoder, () -> {
return JsonTranscoder.create(this.jsonSerializer);
});
this.cryptoManager = Optional.ofNullable(builder.cryptoManager);
}

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Web links

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Fix versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created December 9, 2021 at 6:09 AM
Updated February 22, 2022 at 1:14 PM
Resolved December 14, 2021 at 7:16 PM
Instabug