Socket
Socket
Sign inDemoInstall

jsonext

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonext

An extension of JSON that supports the next generation of ECMAScript features


Version published
Weekly downloads
3
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

JSONext

An extention of JSON that supports Next gen features.

This pre-release version wraps JSON.stringify.

Current features

JSON5 syntax

{
    // 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.

Unicode property names

Including unicode escapes. The following documents are equivalent.

{ ùńîċõďë: '¡ celebridad internacional !' }
{ \u00f9\u0144\u00ee\u010b\u00f5\u010f\u00eb: "¡ celebridad internacional !" }

Unicode code point escapes in strings

{ surrogatePairs: '\u{20BB7}' }

Hex escapes in strings

{ hexEscapes: 'No \x65\x73\x63\x61\x70\x65 from reality' }

Template literals without substitutions

{ templates: `Jane said, "It's great!"` }

The following document is invalid.

{ invalidTemplate: `Jane said, "${message}"` }

Keywords

FAQs

Package last updated on 22 Dec 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc