private static function lastErrorMessage() { if (function_exists('json_last_error_msg')) { return json_last_error_msg(); } return 'JSON string is malformed'; }