Skip to content

Latest commit

 

History

History
56 lines (33 loc) · 1.95 KB

File metadata and controls

56 lines (33 loc) · 1.95 KB

v0.1.0 [code, diff]

This release tightens JSON5 support and adds helpful utility features:

  • Support hexadecimal numbers. (Thanks @MaxNanasy.)

  • Reject octal numbers properly now. Previously, they were accepted but improperly parsed as base-10 numbers. (Thanks @MaxNanasy.)

  • Breaking: Reject "noctal" numbers now (base-10 numbers that begin with a leading zero). These are disallowed by both JSON5 and JSON, as well as by ES5's strict mode. (Thanks @MaxNanasy.)

  • Support leading decimal points in decimal numbers. (Thanks @MaxNanasy.)

  • Breaking: Reject trailing decimal points in decimal numbers now. These are disallowed by both JSON5 and JSON. (Thanks @MaxNanasy.)

  • Breaking: Reject omitted elements in arrays now. These are disallowed by both JSON5 and JSON.

  • Throw proper SyntaxError instances on errors now.

  • Add Node.js require() hook. Require json5/lib/require to register it.

  • Add Node.js executable to compile JSON5 files to JSON. Run with json5.

v0.0.1 [code, diff]

This was the first implementation of this JSON5 parser.

  • Support unquoted object keys, including reserved words. Unicode characters and escape sequences sequences aren't yet supported.

  • Support single-quoted strings.

  • Support multi-line strings.

  • Support trailing commas in arrays and objects.

  • Support comments, both inline and block.

v0.0.0 [code]

Let's consider this to be Douglas Crockford's original json_parse.js — a parser for the regular JSON format.