Closed mnabarro closed 1 week ago
Hi,
Thanks for your feedback.
See, empty values are valid as in {"k":""}
.
Also, empty keys are valid like this: {"":"v"}
.
See JSON Lint as reference.
Regards,
Marcelo.
Thanks you for your quick response. I know that empty strings are valid as keys or values but, what I was trying to say is that, if you pass an empty string to validate ( i.e.check('')
) it returns true
and it should return false
, just like JSON Lint does if you simply click on the [Validate JSON] button without any text in the textarea.
Best regards.
Oh, Now I got it. It is simple to implement. Meanwhile, you can check strings that are not empty, right? :-) I'll share it in next update. Best.
Done! Sorry for the delay.
Hi! Thanks for this project. I'm using it to validate json files and an empty string passes validation and I think it should not.