<?php json_last_error(): int
<?php $encoded = json_encode($value); if (json_last_error() !== JSON_ERROR_NONE) { throw ConversionException::conversionFailedSerialization($value, 'json', json_last_error_msg()); }
<?php $val = json_decode($value, true); if (json_last_error() !== JSON_ERROR_NONE) { throw ConversionException::conversionFailed($value, $this->getName()); }