
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
:link: Transparent references in JSON
json-rel
converges the following standards and libraries in order to help normalize JSON reference/relationship descriptors:
The goal is to increase developer transparency and to provide a unified, semantic interface for working with related JSON data.
Aside from being all around simple, json-rel
spares library developers from having to:
npm install json-rel
This example shows how to use the main feature of json-rel
, which is being able to provide any relationship or reference string to $
, an "operator" which will automatically identify the correct specification to use based on the relation itself:
import $ from 'json-rel'
const data = {
foo: {
bar: true
}
}
let query = $('foo.bar').use(data).get() // true
let path = $('$.foo.bar').use(data).get() // true
let pointer = $('/foo/bar').use(data).get() // true
If you want to be slightly more concise:
let query = $('foo[bar]', data).get() // true
let path = $('$.foo.bar', data).get() // true
let pointer = $('/foo/bar', data).get() // true
You may also, of course, access and use each specification individually:
import {query, path, pointer} from 'json-rel'
query('foo[bar]', data).get() // true
path('$.foo.bar', data).get() // true
pointer('/foo/bar', data).get() // true
You can also infer the specification directly from the relation itself via which
:
import which from 'json-rel'
which('foo[bar]') // -> json-query
which('$.foo.bar') // -> json-path
which('/foo/bar') // -> json-pointer
FAQs
Transparent references in JSON
We found that json-rel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.