v0.8.2
json5
コメントと末尾のコンマをサポートするJSON5のエンコードおよびデコード用の軽量ライブラリです。
20いいね 1.3万30日間ダウンロード150Pub ポイント
AndroidiOSWebmacOSWindowsLinux
Dart および Flutter の JSON5
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
This Dart package is a port of JSON5, originally written in pure JavaScript.
It follows the same algorithms and specifications as the original JSON5, ensuring identical behavior.
However, Dart has different naming conventions—see the example below.
import 'package:json5/json5.dart';
void main() {
var obj = JSON5.parse('''
{
/* Comment block */
name: { first: "Phat" },
lang: ["C++", "Dart", "Kotlin"],
nums: [NaN, Infinity, -Infinity]
} // End object
''');
var compact = JSON5.stringify(obj);
print(compact);
var pretty = JSON5.stringify(obj, space: 2);
print(pretty);
}
用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗