1.0.1 • Published 6 years ago

json-validator-duplicated-keys v1.0.1

Weekly downloads
185
License
MIT
Repository
github
Last release
6 years ago

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