搜尋套件、儲存庫與 APP 分類

GitHub 儲存庫damphat/json5-dart

json5-dart

dart 和 flutter 的 JSON5

json5-dart 專案封面
星標
13
分支
5
最近推送(UTC)
2025年2月23日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

JSON5 for Dart and Flutter

Dart CI

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.

Usage

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);
}

References

Phat GitHub avatar
GitHub 作者

Phat ↗

Full-stack developer, open source enthusiast.

HCM City, Vietnam官方網站 ↗
語言Dart

分類

此儲存庫發佈的套件

使用的依賴

依賴清單 2 項

  • lints開發依賴^3.0.0
  • test開發依賴^1.14.4

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗