function JsonParser::lint
@phpstan-param int-mask-of<self::*> $flags
Parameters
string $input JSON string:
int $flags Bitmask of parse/lint options (see constants of this class):
Return value
null|ParsingException null if no error is found, a ParsingException containing all details otherwise
File
-
vendor/
seld/ jsonlint/ src/ Seld/ JsonLint/ JsonParser.php, line 185
Class
- JsonParser
- Parser class
Namespace
Seld\JsonLintCode
public function lint($input, $flags = 0) {
try {
$this->parse($input, $flags);
} catch (ParsingException $e) {
return $e;
}
return null;
}