FLUTTER ECOSYSTEM

pikaju/dart-json-patch

用於 JSON Patch 標準的純 Dart 工具套件。

dart-json-patch 專案封面
Stars
19
Forks
10
最近推送(UTC)
2021年7月29日
專案狀態
未封存
Julien Scholz GitHub avatar
GITHUB User

Julien Scholz ↗

Software engineer and wannabe entrepreneur

Hamburg, Germany
語言Dart

此儲存庫發佈的套件

使用的依賴

依賴清單 2 項

原始 README

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

展開 / 收合專案 README

JSON Patch for Dart

A simple utility package for JSON Patch. Includes a simple diff algorithm as well as the ability to apply JSON Patch operations to a JSON-like Dart object.

Usage

import 'package:json_patch/json_patch.dart';

...

final ops = JsonPatch.diff(oldJson, newJson);
try {
    final patchedJson = JsonPatch.apply(json, patches, strict: false);
} on JsonPatchTestFailedException catch (e) {
    print(e);
}

See the example or the API docs for more information.