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.