json_to_dart
json_to_dart copied to clipboard
Provide hints to the generator to overwrite types
hi @javiercbk , Thanks for your awesome project, it is very helpful and saving much time when I want to generate json as dart class model.
But, sometime I found a weird json like this
[
{
"volume":123
},
{
"volume":123.5
},
{
"volume":null
}
]
it will be awesome if there is an option to cast all int and double as String in your project.. thank you
Actually the library supports this but the frontend does not. I thought about providing hint to the generator and force it to choose a type even though it was not the one that it had detected.
this should be implemented in the frontend but sadly it is not a trivial amount of work.