public static function isJsonString($value, $message = null, $propertyPath = null)
{
if (null === json_decode($value) && JSON_ERROR_NONE !== json_last_error()) {
$message = sprintf($message ?: 'Value "%s" is not a valid JSON string.', static::stringify($value));
throw static::createException($value, $message, static::INVALID_JSON_STRING, $propertyPath);
}
return true;
}