public function convert($string)
{
$json = json_decode($string, true);
if (JSON_ERROR_NONE !== ($jsonErrorCode = json_last_error())) {
$message = "An error occured while decoding the JSON input:\n";
$message .= $this->jsonDecodeErrorMessage($jsonErrorCode);
$message .= "\nInput JSON:\n\n" . $string;
throw new ParserException($message);
}
return $json;
}