1.3.0 • Published 9 years ago

json-parameter-parser v1.3.0

Weekly downloads
1
License
MIT
Repository
-
Last release
9 years ago

JSON Validator

Simple JSON Validator through parameters for browser and Node.js.

Installation

Via npm on Node:

npm install json-parameter-parser

Usage

Reference in your program:

var validator = require('json-parameter-parser');

Parse a json

var valid = validator(json, ['parameter1', 'parameter2', 'parameter3.nested']);

If you want a wildcard search in a nested json just type:

var valid = validator(json, ['parameter1.*']);

You can also only test if one particular property is in a JSON.

var valid = validator(json, ['parameter']);

It is as simple as this. Returns true if the JSON has all the given Parameters, false if not.

Development

git clone git://github.com/teuron/json-validator.git
cd json-validator
npm install
npm test

License

MIT

Contribution

Feel free to file issues and submit pull requests contributions are welcome :)

If you submit a pull request, please be sure to add or update corresponding test cases, and ensure that npm test continues to pass.

1.3.0

9 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago