-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
Description
Hi, thank you for your work on tuple!
Is there a recommended way to use tuple together with json_serializable?
For example, if I want to automatically serialize a class that looks like this:
@JsonSerializable(nullable: false)
class Person {
final String firstName;
final String lastName;
final Tuple2<String,int> myTuple;
Person({this.firstName, this.lastName, this.myTuple});
factory Person.fromJson(Map<String, dynamic> json) => _$PersonFromJson(json);
Map<String, dynamic> toJson() => _$PersonToJson(this);
}