-
Notifications
You must be signed in to change notification settings - Fork 188
rename fields from JSON deserialization #150
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
Comments
It should work to rename fields using a serializer plugin, as in this request to support renaming enum values: Please let me know if that works. It would make sense to have standard plugins for doing this be part of built_value. |
Great! Yes, a standard way would be great. |
I created a plugin for that and it's working fine. |
Thanks! Probably we need at least a set of examples, yes. I'll leave this issue open for that. |
I'm going to merge into #144. |
I have to deserialize JSON that contains
case
as field name which is a reserved word in Dart and therefore I can't use that as field name in a built_value class.Is a custom serializer like explained in #134 (comment) a possible approach to solve that, or is there something better?
The text was updated successfully, but these errors were encountered: