Skip to content

Library that generates dart classes from json strings with some modifications to make it work with the latest Dart SDK.

License

Notifications You must be signed in to change notification settings

Erengun/json_to_dart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON to Dart

This is a fork of json_to_dart by Javier Lecuona with some modifications to make it work with the latest Dart SDK.

I aim to maintain this fork and keep it up to date with the latest Dart SDK.

Warning: This is a work in progress and may not work as expected.

Given a JSON string, this library will generate all the necessary Dart classes to parse and generate JSON.

This library is designed to generate Flutter friendly model classes following the flutter's doc recommendation.

Caveats

  • When an empty array is given, it will create a List. Such weird behaviour should warn the user that there is no data to extract.
  • Equal structures are not detected yet (Equal classes are going to be created over and over).
  • Properties named with funky names (like "!breaks", "|breaks", etc) or keyword (like "this", "break", "class", etc) will produce syntax errors.
  • Array of arrays are not supported:
[[{ "isThisSupported": false }]]
[{ "thisSupported": [{ "cool": true }] }]

About

Library that generates dart classes from json strings with some modifications to make it work with the latest Dart SDK.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 100.0%