Skip to content

JSONDiff is an Elixir implementation of the diffing element of the JSON Patch format, described in RFC 6902

License

Notifications You must be signed in to change notification settings

EddyLane/elixir_json_diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSONDiff

JSONDiff is an Elixir implementation of the diffing element of the JSON Patch format, described in RFC 6902.

This library only handles diffing. For patching, see the wonderful JSONPatch library.

This library only supports add, replace and remove operations.

It is based on the very fast JavaScript library JSON-Patch

Examples

iex> JSONDiff.diff(%{"a" => 1}, %{"a" => 2})
[%{"op" => "replace", "path" => "/a", "value" => 2}]

iex> JSONDiff.diff([1], [2])
[%{"op" => "replace", "path" => "/0", "value" => 2}]

Installation

# mix.exs
def deps do
  [
    {:json_diff, "~> 0.1.2"}
  ]
end

Authorship and License

JSONDiff is released under the MIT License, available at LICENSE.txt.

About

JSONDiff is an Elixir implementation of the diffing element of the JSON Patch format, described in RFC 6902

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages