-
Notifications
You must be signed in to change notification settings - Fork 192
Open
Labels
Description
It would be convenient if we could set field naming policy for Json serialization globally.
I am aware that:
- It is possible to change single field naming via
BuiltValueField
. But it is cumbersome to do this for thousands of fields. And more often devs wants to set global policy instead of having fields with different naming conventions. - It is possible to add additional serialization plugin for renaming. But that is not optimal from performance and logic side. Json plugin is responsible for converting dart objects to Json representation. It already does key name generation by looking into field name or using BuiltValueField value.
Every single json serializer I used with Java (GSON, Jackson, Moshi) have such functionality. So IMHO this is StandardJsonSerializer
responsibility. WDYT?
related #144
jhionan, skybur, RiteshChandnani, ibrahim-mubarak, samlythemanly and 4 more