15 KiB
10.2.0 (2019-12-28)
Features
- Allow trimming trailing commas in arrays and objects (JSON5) (136ea99)
- Allow unifying quotes around object keys to double or single ones (JSON5) (6b6da17)
10.1.1 (2019-12-27)
Bug Fixes
- Restore compatibility with IE11 (55b8a48)
10.1.0 (2019-12-27)
Features
- Alternatively accept number of spaces for the indent parameter (4c25739)
10.0.2 (2019-12-27)
Bug Fixes
- Do not modify input options in the tokenize method (7e3ac0b)
10.0.1 (2019-12-27)
Bug Fixes
- Pretty-printer: keep the comment after opening an object scope indented (4fbc09d)
10.0.0 (2019-12-27)
Bug Fixes
- Rename the property "exzerpt" in error information to "excerpt" (4c74e3d)
Features
- Add support for pretty-printing of the JSON input (d5eaa93)
BREAKING CHANGES
-
If you used the property "exzerpt" from the parsing error object, you have to change it to "excerpt". It should be easy using a full-text search in your sources.
-
The option for pretty-printing invalid input has been renamed:
-p (--pretty-print) ==> -P (--pretty-print-invalid)
The option -p (--pretty-print) will newly prettify the raw (text) input instead of formatting the parsed JSON object.
9.0.0 (2019-12-22)
chore
- Upgrade package dependencies (4a8f2d9)
Features
- Add TypeScript typings (ba6c979)
BREAKING CHANGES
- Dependencies (commander, at least) dropped support for Node.js 4. Node.js 6 should still work, but officially it is not supported either. You should upgrade to the current or still supported Node.js LTS version.
8.0.3 (2019-09-24)
Bug Fixes
- Upgrade package dependencies and adapt sources (9f1f332)
8.0.2 (2019-07-04)
Bug Fixes
- Put only the reason of the error to the error.reason property when the custom parser is used; not the full message including the error context (8d7f0b1)
- Update newline replacement regex to show correct error position on Windows (7af364c)
8.0.0 (2019-06-16)
Bug Fixes
- Give the schema-drafts.js proper name and path in source maps (c2f0148)
Features
- Add the tokenize method returning tokens instead of the parsed object (cc7b554)
- Improve schema error reporting to the level of data parsing (ea5a8a2)
- Remove deprecated exports
Parserandparser(8bda5b1)
BREAKING CHANGES
- The
Parserclass andparserinstance did not bring any benefit. They were generated by Jison. After abandoning the Jison parser they were kept for compatibility only. The only method on theParserprototype was theparse. It remains unchanged as a direct export. Drop the class interface and just call theparsemethod directly.
7.0.3 (2019-06-03)
Bug Fixes
- Ensure, that tokens and keys in error messages are enclosed in quotation marks (2149198)
7.0.2 (2019-06-02)
Bug Fixes
- Upgrade minificating module (04d80d7)
7.0.1 (2019-06-02)
Bug Fixes
- Recognize boxed string as schema environment too (e37b004)
7.0.0 (2019-06-02)
Bug Fixes
- Do not use the native parser in Safari and Node.js 4 (a4a606c)
- Include the minified scripts used on the on-line page in the NPM module (03561ec)
Features
- Add "mode" parameter to set flags for a typical format type easier (9aa09fb)
- Add an option for ignoring trailing commas in object and arrays (7d521fb)
- Add an option for reporting duplicate object keys as an error (09e3977)
- Replace the parser generated by Jison with a hand-built parser from JJU (2781670)
- Support
reviverfrom the nativeJSON.parsemethod (83cd33c)
BREAKING CHANGES
- There is no
yy.parseErrorto intercept error handling. Use the thrown error - it contains all available information. The error does not include thehashobject with structured information. Look for the documentd properties. The location of the error occurrence is available aslocation.start, for example.
DEPRECATION: The only exposed object to use from now on is the parse method as a named export. Other exports (parser and Parser) are deprecated and will be removed in future.
The parser from "Utilities to work with JSON/JSON5 documents" is four times faster, than the previous one, has approximatly the same size and can be easier enhanced, regarding both features and error handling.
6.3.1 (2019-05-31)
Bug Fixes
- Recognise the location of error occurrences in Firefox (7c8c040)
6.3.0 (2019-05-30)
Bug Fixes
- Auto-detect the version of the JSON Schema draft by default (1fe98ef)
- Prefer the native JSON parser, if possible, to improve performance (1639356)
Features
- Support parser options for customisation and performance in JSON schema parsing too (d562826)
6.2.1 (2019-05-30)
Bug Fixes
- Include source code in source maps on the on-line validator page (31e0097)
6.2.0 (2019-05-30)
Features
- Extract the functionality for sorting object keys to a module (a53bd93)
6.1.0 (2019-05-27)
Bug Fixes
- Fix the missing function object (Parser) in the main module exports (eb892aa)
- Restore context options (yy) set in the Parser constructor after the call to parse, if the options were overridden by the method arguments (787c350)
Features
- Use the native JSON parser if a limited error information is enough (8aa9fb1)
6.0.0 (2019-05-26)
Features
- Declare modules in this package using UMD (d442583)
- Remove ParserWithComments and parseWithComment from the interface (3fab374)
BREAKING CHANGES
- The object and the method do not exist any more. Pass the parameter "ignoreComments" as an object
{ ignoreComments: true }either to the constructor of theParserobject, or as the second parameter to the methodparse.
5.0.0 (2019-05-26)
Bug Fixes
- Do not export "main" method, which requires other NPM modules (d8af36a)
Features
- Accept single quotes (apostrophes) as string delimiters (240b8cd)
BREAKING CHANGES
- The "main" method providing a command-line interface importable from other module has been removed. If you used it, have a look at the command-line interface in
lib/cli. You can import this module in instead and it offers a richer interface, than the previously exported "main" method. Thelib/climodule is mapped tobin/jsonlinttoo. However, consider the default library export (lib/jsonlint) for programmatic usage. You will pack less JavaScript code and use smalker, mode programmer-oriented interface.
4.0.2 (2019-05-19)
Bug Fixes
- Print parsing errors if the JSON input is read from stdin (acfdf11)
4.0.1 (2019-05-19)
Bug Fixes
- Do not fail sorting objects with a property called "hasOwnProperty" (b544ceb)
4.0.0 (2019-05-19)
Bug Fixes
- Standardize the interface of the "jsonlint/lib/formatter" module (b8b041b)
Features
- Add web and programmatic interfaces to JSON Schema validation (d45b243)
BREAKING CHANGES
- The formatting method is exposed not as exports.formatter.formatJson, but as exports.format. This module is not documented and it is unlikely, that it broke other project.
3.0.0 (2019-05-18)
Bug Fixes
- Replace JSON schema validator JSV with ajv, because JSV is not maintained any more and does not support current JSON schema drafts (1a4864f)
BREAKING CHANGES
- The environment for the JSON schema validation "json-schema-draft-03" is not available any more. Migrate your schemas from the JSON schema draft 03 to 04 or newer. Drafts 04, 06 and 07 are supported with this release.
2.0.1 (2019-05-18)
Bug Fixes
- Do not depend on the standard checker in the release package (1e9c7b5)
2.0.0 (2019-05-18)
Bug Fixes
- Accept any file extension on the command line directly (14ba31c)
- Do not distribute the web directory in the npm module (7379be8)
- Make the compact-errors mode working with the latest Jison output (d417a9c)
- Rename the long name of the option "extension" to "extensions" (383e50a)
- Replace nomnom as command-line parser with commander, which is maintaitained (6694bba)
- Report the right file name in the compact-errors mode, if multiple files or directories are engtered (7c80326)
Features
- Add a checkbox to recognize JavaScript-style comments to the web page (2a9082a)
- Support parsing and skipping JavaScript-style comments in the JSON input (4955c58)
BREAKING CHANGES
- The options "extension" is not recognized any more. Use the option "extensions" with the same semantics instead.
1.7.0 (2019-05-18)
Features
- Allow specifying JSON file extensions for directory walk (d8e8076)
This is the first version released after forking the original project.