Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
/ json_to_dart Public archive

Library that generates dart classes from json strings

License

Notifications You must be signed in to change notification settings

javiercbk/json_to_dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a26c8a2 · Jan 3, 2022

History

40 Commits
Nov 15, 2019
Jan 3, 2022
Jan 3, 2022
Jan 3, 2022
Jan 3, 2022
Apr 20, 2018
Aug 1, 2019
Apr 20, 2018
Nov 17, 2019
Jan 3, 2022

Repository files navigation

JSON to Dart

Build Status

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 }] }]