json_patch 3.0.0 copy "json_patch: ^3.0.0" to clipboard
json_patch: ^3.0.0 copied to clipboard

Pure Dart utility package for the JSON Patch standard. Can apply patch operations as well as perform a diff algorithm on JSON-like objects.

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.

22
likes
140
points
2.53k
downloads

Publisher

verified publisherjulien-scholz.dev

Weekly Downloads

Pure Dart utility package for the JSON Patch standard. Can apply patch operations as well as perform a diff algorithm on JSON-like objects.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

collection

More

Packages that depend on json_patch