$data = \json_decode($json, $assoc, $depth, $options);
if (JSON_ERROR_NONE !== json_last_error()) {
throw new \InvalidArgumentException(
- 'json_decode error: ' . json_last_error_msg());
+ 'json_decode error: ' . json_last_error_msg()
+ );
}
return $data;
$json = \json_encode($value, $options, $depth);
if (JSON_ERROR_NONE !== json_last_error()) {
throw new \InvalidArgumentException(
- 'json_encode error: ' . json_last_error_msg());
+ 'json_encode error: ' . json_last_error_msg()
+ );
}
return $json;