webroo / dummy-json

Generates random dummy JSON data in Node.js
MIT License
380 stars 61 forks source link

Is there any method to validate the template. #13

Open icodebuster opened 8 years ago

icodebuster commented 8 years ago

Is there any method to validate the template before converting to JSON.

Any help :)

webroo commented 8 years ago

Not that I'm aware of, I'm afraid. The template is not valid JSON so it won't pass a JSON validator, what you need is a Handlebars validator. I did a quick search and couldn't find one. I'll leave this issue open in case anyone else has a good idea.

icodebuster commented 8 years ago

@webroo I too will try something...for time being what I have done is I am validating the generated JSON data and based on that I prompting the user if there is an error in the template.