-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-pkgUsed for miscellaneous pkg/ packages not associated with specific area- teams.Used for miscellaneous pkg/ packages not associated with specific area- teams.pkg-jsonThe json macro packageThe json macro packagetype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
On decimal package someone reported an issue with JsonCodable. He tried the following code:
@JsonCodable()
class User {
final Decimal? test;
User(this.test);
}
As Decimal.fromJson
accepts String as parameter he get an error because the generated code use a Map<String, Object?>
as input.
It would be great if JsonCodable could read the type present in Xxx.fromJson
and use it as serialization format.
pattobrien
Metadata
Metadata
Assignees
Labels
area-pkgUsed for miscellaneous pkg/ packages not associated with specific area- teams.Used for miscellaneous pkg/ packages not associated with specific area- teams.pkg-jsonThe json macro packageThe json macro packagetype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug