src/SecucardConnect/Util/MapperUtil.php
public static function jsonDecode($json, $assoc = false)
    {
        $data = \json_decode($json, $assoc);
        if (JSON_ERROR_NONE !== json_last_error()) {
            $last = json_last_error();
            throw new \InvalidArgumentException(
                'Unable to parse JSON data: '
                . (isset(self::$jsonErrors[$last])
                    ? self::$jsonErrors[$last]
                    : 'Unknown error')
            );
        }
        return $data;
    }
public static function jsonDecode($json, $assoc = false)
    {
        $data = \json_decode($json, $assoc);
        if (JSON_ERROR_NONE !== json_last_error()) {
            $last = json_last_error();
            throw new \InvalidArgumentException(
                'Unable to parse JSON data: '
                . (isset(self::$jsonErrors[$last])
                    ? self::$jsonErrors[$last]
                    : 'Unknown error')
            );
        }
        return $data;
    }
public static function jsonDecode ( $ json , $ assoc = false ) { $ data = \ json_decode ( $ json , $ assoc ) ; if ( JSON_ERROR_NONE !== json_last_error ( ) ) { $ last = json_last_error ( ) ; throw new \ InvalidArgumentException ( 'Unable to parse JSON data: ' . ( isset ( self :: $ jsonErrors [ $ last ] ) ? self :: $ jsonErrors [ $ last ] : 'Unknown error' ) ) ; } return $ data ; }
Decodes an JSON string into a object with properties of standard PHP types, including stdClass or assoc array.
@param string $json The string to decode.
@param boolean $assoc If true a assoc array is returned.
@return mixed The created object, never null or other.
Decodes an JSON string into a object with properties of standard PHP types including stdClass or assoc array .