json-validator-duplicated-keys

1.0.1 • Public • Published

A json handler that has an option to check for duplicated keys This is a fork of json-duplicate-key-handle by KhanhTrinh2094 licensed under MIT license Git of original: https://github.com/KhanhTrinh2094/json-duplicate-key-handle NPM page of original: https://www.npmjs.com/package/json-duplicate-key-handle

Install

npm install json-validator-duplicated-keys

Usage

 
## .validate(jsonString, allowDuplicatedKeys)
Validates a json string and returns error if any, undefined if the json string is valid.
#### jsonString
Type: `String`
 
JSON string to parse
#### allowDuplicatedKeys
Type: `Boolean`
 
Default: `false`
 
Whether duplicated keys are allowed in an object or not

Package Sidebar

Install

npm i json-validator-duplicated-keys

Weekly Downloads

8

Version

1.0.1

License

MIT

Unpacked Size

18.9 kB

Total Files

17

Last publish

Collaborators

  • tluigi003