v3.0.0
json_patch
JSON パッチ標準用の純粋な Dart ユーティリティパッケージ。JSONに似たオブジェクトに対してパッチ操作を適用し、差分アルゴリズムを実行できます。
25いいね 870030日間ダウンロード140Pub ポイント
AndroidiOSWebmacOSWindowsLinux
JSON Patch 標準用の純粋な Dart ユーティリティパッケージ。
^1.15.0^1.17.5以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
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.
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.