Closed
Description
Feature Request
Continuing the discussion in #1972 (comment), we need to support deserializing one pojo into another type without the need to register class
Is your feature request related to a problem? Please describe
Describe the solution you'd like
Step1 Extend ClassDef to replace type
/**
* Return a new {@link ClassDef} by replacing {@code definedClass} of all fields and current {@link ClassSpec} in hierarchy
* from {@code cls} into {@code targetCls}.
*/
public ClassDef replace(Class<?> cls, Class<?> targetCls) {
}
Step2
- Extend ClassResolver with a new readClassInfoWithMetaShare method with passed deserialized type
- The
readClassInfoWithMetaShare
should return the originalClassDef
first, then invokeClassDef#replace
to return a new ClassDef - Use that new ClassDef to create a new Deserializer to deserialize the data into passed deserialized type
Describe alternatives you've considered
No response
Additional context
Metadata
Metadata
Assignees
Labels
No labels