FLUTTER ECOSYSTEM

pikaju/dart-json-patch

Pure Dart utility package for the JSON Patch standard.

dart-json-patch project cover
Stars
19
Forks
10
Last push (UTC)
Jul 29, 2021
Project status
Active
Julien Scholz GitHub avatar
GITHUB User

Julien Scholz ↗

Software engineer and wannabe entrepreneur

Hamburg, Germany
LanguagesDart

Packages published by this repository

Dependencies used

Dependency list 2 items

Original README

English project snapshot. Visit GitHub for the latest content.

Expand / collapse project 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.