New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore custom serializer in root #1397
Comments
Ok, I think I understand the request. I don't know if there is an easy way to achieve this, since serializer/deserializer resolution system has no knowledge of context, to make this determination. But perhaps there is a way; if I can think of something I will add notes here. From custom serializer it would actually be possible to determine, since |
just if somebody happen to be here, i've implemented this idea in this way
|
Hello,
I would suggest improvement, the option to disregard the application of specific serializer on the type of the object when it is the root.
Example:
In this scenario I wish the object to be serialized without using the custom serializer, it is the root object, but that the field use the serializer.
I know the fact that via annotation in the field is a way to solve, but this setting is applied via runtime programming and must apply to all properties of type.
Now I resolved this situation by creating a custom serializer generic testing if the root is to call or not the specific serializers.
The suggestion is to create a global setting in SerializationFeature class to set this setting.
Thanks for your help.
The text was updated successfully, but these errors were encountered: