json-literal-parse

0.0.0 • Public • Published

json-literal-parse

superset of JSON.parse() adding regex, null, and octal literals

browser support

build status

example

var parse = require('json-literal-parse');
var xs = parse('["robot",/^b[eo]{2}p$/,{"x":null,"y":0777}]');
console.dir(xs);

methods

var parse = require('json-literal-parse')

var obj = parse(str)

Parse the input string str, returning the parsed representation obj.

parse() is just like JSON.parse() except that the input may have additional "literal" types not in the JSON spec, which are:

  • regex
  • null
  • octal

install

With npm do:

npm install json-literal-parse

license

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.0
    2

Package Sidebar

Install

npm i json-literal-parse

Weekly Downloads

2

Version

0.0.0

License

MIT

Last publish

Collaborators

  • nopersonsmodules