google / json_serializable.dart

Generates utilities to aid in serializing to/from JSON.
https://pub.dev/packages/json_serializable
BSD 3-Clause "New" or "Revised" License
1.55k stars 397 forks source link

[Feature Request] JsonEnum global configuration #1341

Open aliaksei-liavonik opened 1 year ago

aliaksei-liavonik commented 1 year ago

Hello, I'm working with a backend that sends a significant number of enums formatted in snake case. Upon reviewing the documentation and examples for the json_serializable package, I didn't find a way to globally configure the package to handle snake case enums.

Proposal: It would be highly beneficial to introduce a feature that allows users to set up a global configuration in the build.yaml file to handle snake case enums. This would streamline the process for projects that frequently interact with backends using this particular naming convention.

Thank you for considering this enhancement.

Versions: json_serealizable: 6.7.1 json_annotation: 4.8.1

masreplay commented 4 months ago

@aliaksei-liavonik any updates?