Closed
Description
I've integrated with a very bad API. Their JSON didn't have any types, it was all strings. It would be very usefull to have something like this:
{
"ugly": "true",
}
@JsonSerializable()
class Example {
Example({this.pretty});
@JsonKey(
name: 'ugly',
fromJson: (v) => v == 'true',
toJson: (v) => v.toString(),
)
final bool pretty;
}