Skip to content
pubscout

rfc_6902

0.3.1, released a year ago by karapetov.com

JSON Patch (RFC 6902) implementation for Dart using JSON Pointers.

WASM-ready
$ flutter pub add rfc_6902
Source repository

What it does

Provides tools to build, encode, parse, and apply JSON Patch operations (Add, Copy, Move, Remove, Replace, Test) to JSON documents.

AI-written summary of version 0.3.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to modify JSON documents using the standard JSON Patch (RFC 6902) format.
  • You need to test, add, remove, replace, move, or copy values inside a JSON structure using JSON Pointers.

Skip it when

  • You only need simple JSON serialization without patching capabilities.
  • You need a full JSON schema validation library instead of document mutation.

Strengths

  • Implements the official RFC 6902 standard completely.
  • Supports all core patch operations including Test, Remove, Add, Replace, Move, and Copy.

Weaknesses

  • Limited documentation beyond basic README usage examples.
  • No built-in schema validation.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:rfc_6902/rfc_6902.dart';

void main() {
  const document = {'a': {'b': {'c': 'foo'}}};
  final patch = JsonPatch([{'op': 'remove', 'path': '/a/b/c'}]);
  final result = patch.applyTo(document);
  print(result);
}

Alternatives

Packages that do the same job and could replace rfc_6902.

Works with

Packages commonly used together with rfc_6902: ones it builds on, ones built on it, and its own family.