JsonToDartClass icon indicating copy to clipboard operation
JsonToDartClass copied to clipboard

Converts Uppercase field in JSON to lowercase dart class when generating

Open Gurjot95 opened this issue 5 years ago • 1 comments

If a JSON has an uppercase field for example { TestField: "" } it will generate dart code with testField

which doesn't match with JSON and throws error while mapping.

Gurjot95 avatar Aug 13 '20 02:08 Gurjot95

Wish can change On fromJson and ToJson method, like gson { "Hello" : "hi" // @SerializedName("Hello") is better } class { String hello; }

fromJson(Map map) { hello = map["Hello"];
}

voarlese avatar Oct 08 '20 02:10 voarlese