5.0.1 • Published 3 years ago

jsonpointer v5.0.1

Weekly downloads
1,846,097
License
MIT
Repository
github
Last release
3 years ago

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 jan@apache.org & Marc Bachmann https://github.com/marcbachmann

Thanks to all contributors.

License

MIT License.

is-my-json-validff-vue-jsonschema-form@galgotech/rjsf-coremace-json-schemavue3-ts-form-1react-jsonschema-form--ml@workbase/rjsf-coreschema-form-test@northek/react-json-schema-form-core@dat/better-ajv-errorsvjsf-yipiemballa-rjsfcoregotin-ui@frontoffice/rjsf-core@infinitebrahmanuniverse/nolb-jsonp@samsquatch/alteryx-components@samsquatch/service-titan-componentssklif-ui-kitsklif-api@everything-registry/sub-chunk-1988p149-tablesklif-ui@realrisman/rjsf-coreswagger-mock-validatorweb-component-tester-bundlevue-jsonschema-form-nokwetzelwow.js-juzixml-stream-converterwyuan-schema-formteapackage-tatespoorman297vjsf-arco-designvjsf-arco-design-corevjsf-dpcvjsf-drevjsf-form-kunvjsf-hiottervjsf-imoocvjsf-testvjsf-test001vjsfwww9999v3jsfvcloudcam-playkit-js-hls@dnlowman/danger@clutch-creator/rjsf-core@compensa/langchain@dancamma/openapi-to-graphql@conneryn/cli@consolecore/rjsf-utils@digitalgp/langchain-oracle@digitalbazaar/oid4-client@datacamp/rjsf-core@dougrich/data-storage@bynorth/focals-client-js@rstacruz/pnpm@pdtf/schemas@per1234/generator-kb-documentjc-jsonschema-formis-my-json-valid-custom-errjulien-easy-modaljson-validate-formjsonpointer-clijsonpointer-httpjsonpointer-store-abstractjson-wherejson-xformerjson-schema-static-docsjson-pointer-serverjson-reljson-to-ldpjpm_online_paymentska-flow.jsk0ng_d1nosaur_quenak0ng_d1nosaur_quenbk0ng_d1nosaur_quenck0ng_d1nosaur_quendk0ng_d1nosaur_quenek0ng_d1nosaur_quenfk0ng_d1nosaur_quengk0ng_d1nosaur_quenhk0ng_d1nosaur_quenik0ng_d1nosaur_quenjk0ng_d1nosaur_quenkk0ng_d1nosaur_quennk0ng_d1nosaur_quenok0ng_d1nosaur_quenpk0ng_d1nosaur_quenqk0ng_d1nosaur_quenrk0ng_d1nosaur_quenlk0ng_d1nosaur_quenmk0ng_d1nosaur_quensk0ng_d1nosaur_quentk0ng_d1nosaur_quenuk0ng_d1nosaur_quenvk0ng_d1nosaur_quenwk0ng_d1nosaur_quenxk0ng_d1nosaur_quenyk0ng_d1nosaur_quenzlangchainlangchain-edge-fix
5.0.1

3 years ago

5.0.0

4 years ago

4.1.0

5 years ago

4.0.1

8 years ago

4.0.0

9 years ago

3.0.1

9 years ago

3.0.0

10 years ago

2.0.0

10 years ago

1.1.0

12 years ago

1.0.1

14 years ago

1.0.0

14 years ago