...Its lint method returns detailed parsing errors without decoding the input, while parse produces PHP values and throws exceptions when the document is invalid. Error messages include the relevant line, nearby text, a position marker, and the tokens expected by the parser. Optional flags can reject duplicate object keys, preserve them under generated names, or collect repeated values into arrays. The parser can also return associative arrays and accept JavaScript-style inline or block comments. UTF-8 validation detects malformed byte sequences and reports the first invalid position. ...