Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give Option to make Json Serializable #58

Open
pratikbutani opened this issue Dec 21, 2020 · 1 comment
Open

Give Option to make Json Serializable #58

pratikbutani opened this issue Dec 21, 2020 · 1 comment

Comments

@pratikbutani
Copy link

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.

@sagarmahobia
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants