Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 2, 2024 via pnpm

jsonpointer 1.1.0

Simple JSON Addressing.
Package summary
Share
3
issues
1
critical severity
license
1
2
moderate severity
vulnerability
2
1
license
1
N/A
Package created
13 Jul 2011
Version published
20 Jan 2013
Maintainers
2
Total deps
1
Direct deps
0
License
UNKNOWN

Issues

3

1 critical severity issue

critical
Recommendation: Check the package code and files for license information
via: jsonpointer@1.1.0
Collapse
Expand

2 moderate severity issues

moderate
Recommendation: Upgrade to version 5.0.0 or later
via: jsonpointer@1.1.0
Recommendation: Upgrade to version 5.0.0 or later
via: jsonpointer@1.1.0
Collapse
Expand

Licenses

N/A

N/A
1 Packages, Including:
jsonpointer@1.1.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of jsonpointer 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does jsonpointer do?

JSON Pointer is a Node.js implementation that allows simple addressing for JSON. It gives developers the tools they need to effortlessly extract or manipulate data within a JSON object. It achieves this by using a string of keys/indices to point to a specific location within the JSON document. The library uses the get method to extract data, and the set method for data manipulation.

How do you use jsonpointer?

To use JSON Pointer, it's important to first install it in your project using Node Package Manager (npm). Once installed, you can use the require keyword to import JSON Pointer into your file. Here's an example:

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]

In this example, jsonpointer.get() is used to return the value at the given pointer, while jsonpointer.set() sets the value at the given pointer.

You can also compile a JSON pointer for repeated usage:

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

JSON Pointer can be your go-to tool when you want to access and manipulate JSON data in your Node.js application.

Where are the jsonpointer docs?

The documentation for JSON Pointer can be found on the official JSON Pointer GitHub page at https://github.com/janl/node-jsonpointer. This includes an in-depth guide on various operations you can perform on a JSON object through JSON Pointer. Visit the GitHub page to learn more and empower your JSON management skills.