• Stars
    star
    196
  • Rank 198,553 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 13 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

JSON Pointer (RFC6901) implementation for Node.js

JSON Pointer for Node.js

This is an implementation of JSON Pointer.

CLI

Looking to filter JSON from the command line? Check out jsonpointer-cli.

Usage

var jsonpointer = require('jsonpointer');
var obj = { foo: 1, bar: { baz: 2}, qux: [3, 4, 5]};

jsonpointer.get(obj, '/foo');     // returns 1
jsonpointer.get(obj, '/bar/baz'); // returns 2
jsonpointer.get(obj, '/qux/0');   // returns 3
jsonpointer.get(obj, '/qux/1');   // returns 4
jsonpointer.get(obj, '/qux/2');   // returns 5
jsonpointer.get(obj, '/quo');     // returns undefined

jsonpointer.set(obj, '/foo', 6);  // sets obj.foo = 6;
jsonpointer.set(obj, '/qux/-', 6) // sets obj.qux = [3, 4, 5, 6]

var pointer = jsonpointer.compile('/foo')
pointer.get(obj)    // returns 1
pointer.set(obj, 1) // sets obj.foo = 1

Testing

$ npm test
All tests pass.
$

Node.js CI

Author

(c) 2011-2021 Jan Lehnardt [email protected] & Marc Bachmann https://github.com/marcbachmann

Thanks to all contributors.

License

MIT License.

More Repositories

1

mustache.js

Minimal templating with {{mustaches}} in JavaScript
JavaScript
16,042
star
2

awesome

A Redis implementation in node.js
JavaScript
177
star
3

jscouch

A partial JavaScript re-implementation of CouchDB.
JavaScript
159
star
4

io

Personal URL shortening with CouchDB
JavaScript
90
star
5

couchdbx-core

Package a CouchDB installation on Mac OS X with any Erlang and CouchDB version
Shell
89
star
6

waaa

We Are All Awesome
CSS
44
star
7

couchdbx-app

CouchDBX Mac OS X Application Bundle
Objective-C
37
star
8

my-first-couchdb-plugin

A practical guide to writing CouchDB plugins
Erlang
24
star
9

present.js

Present.js — Makes a slide show out of your HTML
JavaScript
16
star
10

erl-jsonpointer

JSON Pointer implementation for Erlang
Erlang
13
star
11

gigan

Parse JIRA XML into CouchDB
JavaScript
11
star
12

.js

.js
JavaScript
10
star
13

couchdb-mac-app

née CouchDBX
C
8
star
14

couchdb-docs

THIS IS JUST A PREVIEW REPO DO NOT FORK DO NOT SUBMIT ISSUES TO NOT SEND PULL REQUESTS THANKS :)
JavaScript
8
star
15

narrow

too big a gap
JavaScript
7
star
16

sparkler

A Sparkle backend that lives inside CouchDB.
JavaScript
6
star
17

node-CouchDBChanges

Write CouchDB Changes Listeners. Easy.
JavaScript
6
star
18

janl.github.com

Jan's stuff.
4
star
19

couchdb-setup

TBD
Erlang
4
star
20

build-couchdb-mac

Shell
4
star
21

hoodie-app-ember-example

JavaScript
3
star
22

livesaver

Saves Lives
JavaScript
3
star
23

konamibacon.js

what it says on the tin
JavaScript
3
star
24

couchhack.org

CSS
3
star
25

berlin-couchdb

CSS
3
star
26

talks

my talks
3
star
27

hoodie-plugin-user-scripts

WIP
JavaScript
2
star
28

bpm_fragments

Fragments of goodies for the IBM BPM product
2
star
29

planet.couchdb.org

venus config file for planet.couchdb.org
2
star
30

web-notaddressedtome

2
star
31

ccb

CSS
2
star
32

hoodie-plugin-publish-data

JavaScript
2
star
33

hoodie-boilerplate

CSS
2
star
34

couch_query_server2

first prototype of couch-query-server2
Erlang
2
star
35

couchdb-test-couchjs

Work in progress: A test suite for CouchDB’s query server. Replaces test/query_server/query_server_spec.rb
JavaScript
2
star
36

fpaste

Posts contents of stdin to friendpaste.com and places the resulting URL into the system paste buffer. Mac OS X only
1
star
37

janl-test-10

1
star
38

gifmemov

1
star
39

couchdb-nouveau

Fork of CouchDB with the erlang-side of Nouveau jammed in
Erlang
1
star
40

couchdb-ci-cookbooks

mmmmmh pie…
1
star
41

tttest

1
star
42

relephant

My personal ultimate note-taking/task manager thing
JavaScript
1
star
43

swhack-berlin

Hacking in Memory of @aaronsw — Berlin Edition
JavaScript
1
star
44

janl-test-3

1
star
45

janl-test-9

1
star
46

janl-test--

1
star
47

spoof

1
star
48

tiny-npm

Shell
1
star
49

tito-gender-ratio

Determine (guess) the gender ratio of your event through the participants names
JavaScript
1
star
50

travis-test

1
star
51

couchdb-next

discussion only, see /issues
1
star
52

recover-couchdb2

Erlang
1
star
53

per-doc-auth-for-couchdb

Tech Demo, do not use
JavaScript
1
star
54

enhance-test

JavaScript
1
star
55

hoodie-stripe-test

CSS
1
star
56

hoodie-vertebrae

JavaScript
1
star
57

jan-o-test

1
star
58

gk-jan-test

1
star
59

hoodie-plugin-email-debug

allow debugging of emails, sets up mandrill webhook
JavaScript
1
star
60

node-couch-query-server2

node client of couchdb-query-server2
JavaScript
1
star
61

ansible-src-bootstrap

1
star
62

janl-test-1

1
star
63

janl-test-7

1
star