FLUTTER ECOSYSTEM

javiercbk/json_to_dart

JSON 文字列から Dart クラスを生成するライブラリ

json_to_dart のプロジェクト画像
Stars
1335
Forks
381
最終プッシュ(UTC)
2024/04/16
プロジェクト状態
アーカイブ済み
Javier Lecuona GitHub avatar
GITHUB User

Javier Lecuona ↗

言語Dart

技術トピック

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 5 件

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

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