You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My memory was a little rusty but thanks to your example project I was able to figure this out again quickly. In the cases where inheritance occurs, intended serialization type shall be provided via SerializationData typed methods.
/** * Adds value to the serialization data under specific key. * Provided value is simplified using attached Configurer. * <p> * This method allows to narrow target simplification type * and is recommended to be used with non-primitive classes. * <p> * Specifying target simplification type allows to make sure * correct serializer is used, e.g. interface type instead * of some implementation type that would otherwise inferred. * * @param key target key * @param value target value * @param valueType type of value for simplification process * @param <T> type of value */public <T> voidadd(@NonNullStringkey, Objectvalue, @NonNullClass<T> valueType) {
GenericsDeclarationgenericType = GenericsDeclaration.of(valueType);
this.add(key, value, genericType);
}
Describe the bug
I have the following config and want to use the already registered serializer for the message text of the object:
To Reproduce
See the following repository with a failing test: https://github.com/sVoxelDev/okaeri-nested-serialization-bug
Expected behavior
The serializers should leverage already existing serializers.
The text was updated successfully, but these errors were encountered: