improved json validator to output meaningful error

Typo fix and improved error reporting in case of malformed json