Skip to content
 
 

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON Pointer for nodejs

This is an implementation of JSON Pointer.

Usage

var jsonpointer = require("jsonpointer");
var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]};
var one = jsonpointer.get(obj, "/foo");
var two = jsonpointer.get(obj, "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/bar/baz");
var three = jsonpointer.get(obj, "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/qux/0");
var four = jsonpointer.get(obj, "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/qux/1");
var five = jsonpointer.get(obj, "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/qux/2");

jsonpointer.set(obj, "/foo", 6); // obj.foo = 6;

Testing

$ node test.js
All tests pass.
$

Author

(c) 2011 Jan Lehnardt jan@apache.org

License

MIT License.

About

JSON Pointer implementation for NodeJS

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors