Skip to content
forked from tenderlove/hana

An implementation of JSON Patch and JSON Pointer

License

Notifications You must be signed in to change notification settings

matt-morris/hana

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hana

DESCRIPTION:

Implementation of [JSON Patch][1] and [JSON Pointer][2] RFC.

FEATURES/PROBLEMS:

Implements specs of the [JSON Patch][1] and [JSON pointer][2] RFCs:

This works against Ruby objects, so you should load the JSON to Ruby, process it, then emit as JSON again.

SYNOPSIS:

patch = Hana::Patch.new [
  { 'op' => 'add', 'path' => '/baz', 'value' => 'qux' }
]

patch.apply('foo' => 'bar') # => {'baz' => 'qux', 'foo' => 'bar'}

REQUIREMENTS:

  • Ruby

INSTALL:

$ gem install hana

DEVELOPMENT:

hana runs tests from json-patch/json-patch-tests. Fetch the git submodule by running:

git submodule init
git submodule update

Install dependencies with:

bundle install

Then run the tests with:

rake test

About

An implementation of JSON Patch and JSON Pointer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%