Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
jsonext
Advanced tools
Readme
An extention of JSON that supports Next gen features.
npm install --save jsonext
const JSONext = require('jsonext')
Using the unpkg CDN.
<script src="https://unpkg.com/jsonext/dist/jsonext.js"></script>
Using npm.
npm install --save jsonext
<script src="/node_modules/jsonext/dist/jsonext.js"></script>
JSONext is not registered with Bower because it requires committing generated files to the the Git repository, which is a bad thing.
The JSONext API is compatible with the JSON API.
JSONext.parse(text [, reviver])
Parses JSONext text into an ECMAScript value.
JSONext.stringify(value [, replacer [, space]])
Returns a string in JSONext format representing an ECMAScript value.
JSONext uses the file extension .jsonext
. You can require
JSONext files
with the following:
// Register the .jsonext file extension.
require('jsonext/register')
// Load a JSONext file directly.
const config = require('./config.jsonext')
{
// comments
unquoted: 'and you can quote me on that',
singleQuotes: 'I can use "double quotes" here',
lineBreaks: "Look, Mom!\
No \\n's!",
hexadecimal: 0xdecaf,
leadingDecimalPoint: .8675309, andTrailing: 8675309.,
positiveSign: +1,
trailingComma: 'in objects', andIn: ['arrays',],
"backward compatible": "with JSON",
}
Infinity
and NaN
are supported for backward compatibility, but they are
deprecated and produce warnings.
Including unicode escapes. The following documents are equivalent.
{ ùńîċõďë: '¡ celebridad internacional !' }
{ \u00f9\u0144\u00ee\u010b\u00f5\u010f\u00eb: "¡ celebridad internacional !" }
{ surrogatePairs: '\u{20BB7}' }
{ hexEscapes: 'No \x65\x73\x63\x61\x70\x65 from reality' }
{ templates: `Jane said, "It's great!"` }
The following document is invalid.
{ invalidTemplate: `Jane said, "${message}"` }
FAQs
An extension of JSON that supports the Next gen features
The npm package jsonext receives a total of 3 weekly downloads. As such, jsonext popularity was classified as not popular.
We found that jsonext 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.