-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
SerializedName based on a property value #716
Comments
generally no, of course you can set a custom naming strategy and implement it. as advise, is not recommended to have dynamic naming strategy (means that your model can not be used as specification..) |
I totally agree...But I have to do it that way. What do you advise me to use to achieve that? Thanks for your fast reply. |
if you have to do it only for few fields, you can use something as http://stackoverflow.com/questions/41548030/complex-serialization/41552643#41552643 if you have to do it for all the fields in a class, then use a similar approach but using a custom serialization handler. (with the naming strategy you do not have access to the current object..) |
related to #717 |
Thank you, I will try your way or use the handler_callbacks.. |
Is-it possible to have a serialized_name based on a property value?
The text was updated successfully, but these errors were encountered: