patch JSON.parse() to report errors

close #11