Watch 2 Star 6 Fork 0

يىگانە / Json2Dart GeneratorDartUnlicense

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Json to dart class generator, for Example page: spread retract

http://118.31.76.35:8001/

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

Project source git address: https://github.com/javiercbk/json_to_dart

JSON to Dart

Build Status

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

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

Caveats

  • In an array of objects, it is assumed that the first object is representative of the rest of them.
  • 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).
  • Dart automatically casts doubles without decimals (like 10.0) to int. Use doubles with at least one decimal number.
  • Properties named with funky names (like "!breaks", "|breaks", etc) or keyword (like "this", "break", "class", etc) will produce syntax errors.

"this source project is not provided http server, it's provided only convert engine, this project contains a http server api."

How to use it?

okay,

  1. please install dart sdk
  2. download the project,
  3. ./run.sh (For linux or macOS) or ./run.cmd (For windows, PowerShell: ./run)
  4. go to http://127.0.0.1:8001

for Example page, please go to http://118.31.76.35:8001/ (Supported CORS)

Screenshots

输入图片说明

输入图片说明

#Also

you can use http web api http://118.31.76.35:8001/Generate?json={"name" : "yeganaaa", "age" : 24}&rootClassName=Person (Supported CORS)

输入图片说明

Comments ( 0 )

Sign in for post a comment

Dart
1
https://gitee.com/yeganaaa/Json2Dart-Generator.git
git@gitee.com:yeganaaa/Json2Dart-Generator.git
yeganaaa
Json2Dart-Generator
Json2Dart Generator
master

Search

231008 48f1a665 1899542 231017 9a6720c6 1899542