Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Various utilities for JSON References (http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03).
The json-refs npm package is a utility for working with JSON references, which are pointers within JSON objects that reference other parts of the JSON document. It helps resolve these references and can be used to make JSON documents easier to understand and manipulate by consolidating linked data.
Resolving JSON References
This feature allows the resolution of JSON references within a JSON document. The code sample demonstrates how to resolve references in a JSON file located at a specified path, with an option to resolve circular references.
{
"jsonRefs": require('json-refs'),
"path": './somePath/to/json',
"options": { resolveCirculars: true },
"resolvedJson": function() {
var root = jsonRefs.resolveRefsAt(this.path, this.options).then(function (results) {
console.log(results.resolved);
}).catch(function (err) {
console.error(err.stack);
});
return root;
}
}
Finding JSON References
This feature involves identifying all the JSON references in a given JSON object. The code sample shows how to find all references, including those that might be invalid, within a JSON object.
{
"jsonRefs": require('json-refs'),
"jsonObject": { /* some JSON object */ },
"options": { includeInvalid: true },
"foundRefs": function() {
var refs = jsonRefs.findRefs(this.jsonObject, this.options);
console.log(refs);
return refs;
}
}
Swagger Parser is a package that can parse, validate, and dereference Swagger and OpenAPI documents. Similar to json-refs, it handles resolving references but is specifically tailored for Swagger and OpenAPI specs, providing more specialized functionality in these contexts compared to the more general-purpose json-refs.
This package dereferences JSON Schema $refs pointers. Like json-refs, it resolves references within JSON documents but focuses specifically on JSON Schema, making it ideal for scenarios involving JSON Schema validation and manipulation.
Various utilities for JSON References, and JSON Pointers since JSON References are part JSON Pointer.
json-refs is available for both Node.js and the browser. Installation instructions for each environment are below.
Installation for browser applications can be done via Bower or by downloading a standalone binary.
bower install json-refs --save
The standalone binaries come in two flavors:
Installation for Node.js applications can be done via NPM.
npm install json-refs --save
The documentation for this project can be found here: https://github.com/whitlockjc/json-refs/blob/master/docs/README.md
FAQs
Various utilities for JSON References (http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03).
The npm package json-refs receives a total of 0 weekly downloads. As such, json-refs popularity was classified as not popular.
We found that json-refs 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.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.