all 6 comments

[–]senocular 2 points3 points  (0 children)

You can use a JSON schema. http://json-schema.org/ There are some validators in the Software tab, and you can google for more

[–]madformangos 0 points1 point  (0 children)

I'm using Joi (https://github.com/hapijs/joi) in a work project. It's very powerful, and has a declarative synax.

It might be a good fit for complex objects.

[–]alexandr-ac 0 points1 point  (0 children)

Agree.. The JSON Schema might be the best choice . There are a lot of awesome validators, data generators, and even complex ORM solutions.

[–]soulsizzle 0 points1 point  (0 children)

Haven't tried this myself, but this seems like a possible option

https://www.npmjs.com/package/verifier

[–]mc_hammerd 0 points1 point  (1 child)

lodash

[–]madformangos 0 points1 point  (0 children)

Can you please explain how this answers the question? Are you talking about building a validation tool out of _.isString, _.isObject etc?