Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marianoguerra/json-patch.erl
a json patch (RFC 6902) implementation for erlang data structures using jsx and dotto
https://github.com/marianoguerra/json-patch.erl
Last synced: about 1 month ago
JSON representation
a json patch (RFC 6902) implementation for erlang data structures using jsx and dotto
- Host: GitHub
- URL: https://github.com/marianoguerra/json-patch.erl
- Owner: marianoguerra
- License: mpl-2.0
- Created: 2014-11-18T14:10:55.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-28T09:55:23.000Z (over 8 years ago)
- Last Synced: 2023-04-21T08:16:31.792Z (over 1 year ago)
- Language: Erlang
- Size: 68.4 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
json-patch.erl: JSON Patch (RFC 6902) implementation for erlang data structures
===============================================================================this is a thing wrapper around `dotto `_
that translates json patch objects into dotto operations and then applies
them to a given object.it's useful if you have a rest API and want to implement PATCH method with
"application/json-patch+json".if you want to manipulate erlang data structures from code it's better to use
dotto directly.build
-----::
make
run tests
---------::
make tests
see how it works
----------------just read the RFC or look the test/tests.json file, the usage is::
{ok, ParsedPatch} = jsonpatch:parse(JsonPatch),
{ok, Result} = jsonpatch:patch(ParsedPatch, Obj).JsonPatch can be a binary containing a json patch object or an erlang data
structure, with the result of parsing a json patch object from json.LICENSE
-------MPL 2.0