@@ -15,7 +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 .
18+ * Optionally ignores trailing commas and reports duplicate object keys as an error .
1919* Supports [ JSON Schema] drafts 04, 06 and 07.
2020* Prefers the native JSON parser to gain the [ best performance] , while showing error messages of the same quality.
2121* Implements JavaScript modules using [ UMD] to work everywhere.
@@ -81,6 +81,7 @@ By default, `jsonlint` will either report a syntax error with details or pretty-
8181 -C, --comments recognize and ignore JavaScript-style comments
8282 -S, --single-quoted-strings support single quotes as string delimiters
8383 -T, --trailing-commas' ignore trailing commas in objects and arrays
84+ -D, --no-duplicate-keys report duplicate object keys as an error
8485 -V, --validate [file] JSON schema file to use for validation
8586 -e, --environment [env] which specification of JSON Schema
8687 the validation file uses
@@ -132,6 +133,7 @@ The `parse` method offers more detailed [error information](#error-handling), th
132133| ` ignoreComments ` | ignores single-line and multi-line JavaScript-style comments during parsing as another "whitespace" (boolean) |
133134| ` ignoreTrailingCommas ` | ignores trailing commas in objects and arrays (boolean) |
134135| ` allowSingleQuotedStrings ` | accepts strings delimited by single-quotes too (boolean) |
136+ | ` allowDuplicateObjectKeys ` | allows reporting duplicate object keys as an error (boolean) |
135137| ` mode ` | sets multiple options according to the type of input data (string) |
136138
137139The ` mode ` parameter (string) sets parsing options to match a common format of input data:
0 commit comments