The parser doesn't check for the case when there is a ',' followed by nothing so strings like "[1,]" , '{"a":1,}' pass as valid JSONs