hiranthaR / Json-to-Dart-Model

Json to Dart Model extension can convert JSON objects into Dart data classes. It supports pure Dart class conversion, Flutter-recommended JSON serialization using annotations, Freezed support, Effective Dart:Style, and many more features. Currently, it has more than 135,000 installs.
https://marketplace.visualstudio.com/items?itemName=hirantha.json-to-dart
MIT License
93 stars 17 forks source link

Use original case of json fields #13

Closed apgapg closed 3 years ago

apgapg commented 3 years ago

Fixes #12

I have only included this change for freezed classes only. This will add @JsonKey(name:'') before each key respecting the original case

Sample:

    @JsonKey(name: "isSkippable") bool isSkippable,
    @JsonKey(name: "isOnetime") bool isOnetime,
    @JsonKey(name: "Disable") bool disable,
    @JsonKey(name: "Deleted") String deleted,

Note disable, deleted keys case