Skip to content

Releases: corka149/jsonpatch

Escaping, appending operations, bug fixing

18 Feb 11:33
Compare
Choose a tag to compare
  • Made jsonpatch more Elixir-API-like by adding Jsonpatch.apply_patch! (which raise an exception) and changed Jsonpatch.apply_patch to return a tuple.
  • Implemented escaping for '~' and '/'
  • Allow usage of '-' for Add and Copy operation
  • Fixed adding and copying values to array
  • Improved error feedback of test operation
  • Fixed: Replace operation adds error to target
  • Cleaned code: Replaced strange constructs of Enum.with_index with Enum.fetch

Improved documentation

15 Feb 17:20
Compare
Choose a tag to compare

Improvement of documents (especially for hexdocs.pm)

Reviewed documentation and code

15 Feb 14:57
Compare
Choose a tag to compare

The tests were improved since last release. The documentation was also reviewed.

Error feedback

03 Jun 19:37
Compare
Choose a tag to compare

Jsonpatch provides now helpful feedback on patch error like:

iex> patch = [
...> %Jsonpatch.Operation.Add{path: "/age", value: 33},
...> %Jsonpatch.Operation.Test{path: "/name", value: "Alice"}
...> ]
iex> target = %{"name" => "Bob", "married" => false, "hobbies" => ["Sport", "Elixir", "Football"], "home" => "Berlin"}
iex> Jsonpatch.apply_patch(patch, target)
{:error, :test_failed, "Expected value 'Alice' at '/name'"}

Better documentation

30 May 07:02
Compare
Choose a tag to compare

It were some documentation missing.

Feature complete

30 May 06:53
Compare
Choose a tag to compare

Jsonpatch should included every requirement of https://tools.ietf.org/html/rfc6902 at this point.