json5
json5 copied to clipboard
JSON5 — JSON for Humans
In this diff I added new entry point to compile es modules with named exports to solve this problem (https://github.com/json5/json5/issues/240). It's a breaking change so we can drop legacy node...
String parse optimizations: Fixed #232, #164, #85 Improvements of string parse to avoid crash on very long strings (>100MB) and speed-up for all string sizes (from 2 mins for 10MB...
Add multi-line comment Add a better example of trailing comma in an object
Properties should be set with `Object.defineProperty` to maintain backward compatibility with `JSON.parse`. Currently JSON5 exhibits the following behavior. ```js JSON.parse(`{"__proto__": 1}`) // {__proto__: 1} JSON5.parse(`{"__proto__": 1}`) // {} ``` However,...
I understood that the json object is designed to be unordered, and json arrays will preserve order. So if I would like to preserve the order , then I should...
PCRE is now the main regex format, included into stdlibs of the most of languages. Why not to allow inserting **literal** regexes into JSON5 document?
The json5-spec didn't mention it. ```js JSON5.parse('{__proto__:1}').__proto__ // not 1 ``` I know it's in js-spec, I just wonder whether it should be same like js. ```js ({__proto__:1}).__proto__ // not...
Json5 module has a hard dependecy on minimist package which is necessary only when you run a CLI for converting JSON5 to JSON and for validating the syntax of JSON5...
This is just a couple suggestions for new configurable options for `JSON5.stringify(...)`: - Configure inclusion of trailing comma - Configure inclusion of whitespace "padding" for single line output. For example,...