Give Option to make Json Serializable
pratikbutani opened this issue · comments
Pratik Butani commented
Greetings!
I have used this tool. It is very useful excepting some problems.
I am using json_serializable
library for JSON Parsing. It is creating toJson and fromJson method itself, we just need to write their format.
Example :
import 'package:json_annotation/json_annotation.dart';
part 'example.g.dart';
@JsonSerializable(nullable: false)
class Person {
final String firstName;
final String lastName;
final DateTime dateOfBirth;
Person({this.firstName, this.lastName, this.dateOfBirth});
factory Person.fromJson(Map<String, dynamic> json) => _$PersonFromJson(json);
Map<String, dynamic> toJson() => _$PersonToJson(this);
}
Hope for best if you can also support this thing.
Sagar Mahobia commented
https://deploy-preview-3--dart-quicktype.netlify.app/
check out and drop a comment at chunlee-thong/dart-quicktype#3 and help it get merged by the author.