rfc_6902
0.3.1, released a year ago by karapetov.com
JSON Patch (RFC 6902) implementation for Dart using JSON Pointers.
WASM-ready
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.
- json_schema
Validate JSON data against JSON Schema drafts in Dart.
63Compare - remove_emoji
Dart package to remove or replace emojis in text
50Compare - json_patch
Pure Dart utility package for the JSON Patch standard to apply patches and perform diffs.
50Compare
Works with
Packages commonly used together with rfc_6902: ones it builds on, ones built on it, and its own family.
- rfc_6901rfc_6902 depends on itImplements RFC 6901 JSON Pointer for reading, writing and removing values in JSON documents.
- json_pathSame familyDart implementation of RFC 9535 JSONPath for querying and manipulating JSON
- ciderSame familyCLI tool for Dart package maintenance to automate pubspec.yaml and CHANGELOG.md updates.
- tandemBuilt on rfc_6902Makes an existing Flutter screen agent-aware over AG-UI.