🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@swagger-api/apidom-json-pointer

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swagger-api/apidom-json-pointer

Evaluate JSON Pointer expressions against ApiDOM.

1.0.0-beta.43
latest
Source
npm
Version published
Weekly downloads
492K
-18.74%
Maintainers
1
Weekly downloads
 
Created

What is @swagger-api/apidom-json-pointer?

@swagger-api/apidom-json-pointer is an npm package that provides utilities for working with JSON Pointers, which are a way to reference specific parts of a JSON document. This package is particularly useful for navigating and manipulating JSON data structures in a standardized way.

What are @swagger-api/apidom-json-pointer's main functionalities?

Creating JSON Pointers

This feature allows you to create a JSON Pointer instance from a string. The created pointer can then be used to reference specific parts of a JSON document.

const { JsonPointer } = require('@swagger-api/apidom-json-pointer');
const pointer = JsonPointer.create('/path/to/element');
console.log(pointer.toString()); // Outputs: /path/to/element

Resolving JSON Pointers

This feature allows you to resolve a JSON Pointer against a JSON document to retrieve the value at the specified location.

const { JsonPointer } = require('@swagger-api/apidom-json-pointer');
const document = { path: { to: { element: 'value' } } };
const pointer = JsonPointer.create('/path/to/element');
const value = pointer.resolve(document);
console.log(value); // Outputs: 'value'

Setting Values with JSON Pointers

This feature allows you to set a value at a specific location in a JSON document using a JSON Pointer.

const { JsonPointer } = require('@swagger-api/apidom-json-pointer');
const document = { path: { to: { element: 'value' } } };
const pointer = JsonPointer.create('/path/to/element');
pointer.set(document, 'newValue');
console.log(document.path.to.element); // Outputs: 'newValue'

Other packages similar to @swagger-api/apidom-json-pointer

FAQs

Package last updated on 13 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts