• Stars
    star
    189
  • Rank 198,191 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 13 years ago
  • Updated over 1 year 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

build-couchdb-mac

Shell
4
star
20

couchdb-setup

TBD
Erlang
3
star
21

konamibacon.js

what it says on the tin
JavaScript
3
star
22

couchhack.org

CSS
3
star
23

livesaver

Saves Lives
JavaScript
3
star
24

talks

my talks
3
star
25

web-notaddressedtome

2
star
26

hoodie-app-ember-example

JavaScript
2
star
27

berlin-couchdb

CSS
2
star
28

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
29

hoodie-plugin-user-scripts

WIP
JavaScript
1
star
30

fpaste

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

janl-test-10

1
star
32

bpm_fragments

Fragments of goodies for the IBM BPM product
1
star
33

planet.couchdb.org

venus config file for planet.couchdb.org
1
star
34

gifmemov

1
star
35

couchdb-nouveau

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

ccb

CSS
1
star
37

hoodie-plugin-publish-data

JavaScript
1
star
38

couchdb-ci-cookbooks

mmmmmh pie…
1
star
39

tttest

1
star
40

swhack-berlin

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

hoodie-boilerplate

CSS
1
star
42

couch_query_server2

first prototype of couch-query-server2
Erlang
1
star
43

shelljs

Portable Unix shell commands for Node.js
JavaScript
1
star