@@ -15,6 +15,7 @@ This is a fork of the original package with the following enhancements:
1515* Walks directories recursively (by Paul Vollmer).
1616* Provides 100% compatible interface to the native ` JSON.parse ` method.
1717* Optionally recognizes JavaScript-style comments and single quoted strings.
18+ * Optionally ignores trailing commas in objects and arrays.
1819* Supports [ JSON Schema] drafts 04, 06 and 07.
1920* Prefers the native JSON parser to gain the [ best performance] , while showing error messages of the same quality.
2021* Implements JavaScript modules using [ UMD] to work everywhere.
@@ -79,6 +80,7 @@ By default, `jsonlint` will either report a syntax error with details or pretty-
7980 -M, --mode set other parsing flags according to a format type
8081 -C, --comments recognize and ignore JavaScript-style comments
8182 -S, --single-quoted-strings support single quotes as string delimiters
83+ -T, --trailing-commas' ignore trailing commas in objects and arrays
8284 -V, --validate [file] JSON schema file to use for validation
8385 -e, --environment [env] which specification of JSON Schema
8486 the validation file uses
@@ -128,6 +130,7 @@ The `parse` method offers more detailed [error information](#error-handling), th
128130| Option | Description |
129131| -------------------------- | --------------------------- |
130132| ` ignoreComments ` | ignores single-line and multi-line JavaScript-style comments during parsing as another "whitespace" (boolean) |
133+ | ` ignoreTrailingCommas ` | ignores trailing commas in objects and arrays (boolean) |
131134| ` allowSingleQuotedStrings ` | accepts strings delimited by single-quotes too (boolean) |
132135| ` mode ` | sets multiple options according to the type of input data (string) |
133136
@@ -137,7 +140,7 @@ The `mode` parameter (string) sets parsing options to match a common format of i
137140| ------- | --------------------------- |
138141| ` json ` | complies to the pure standard [ JSON] (default if not set) |
139142| ` cjson ` | JSON with comments (sets ` ignoreComments ` ) |
140- | ` json5 ` | complies to [ JSON5] (sets ` ignoreComments ` , ` allowSingleQuotedStrings ` and other flags ) |
143+ | ` json5 ` | complies to [ JSON5] (sets ` ignoreComments ` , ` allowSingleQuotedStrings ` , ` ignoreTrailingCommas ` and enables other JSON5 features ) |
141144
142145### Schema Validation
143146
0 commit comments