public static function parse($args/* inherit from json_decode */)
    {
        // extract arguments
        $args = \func_get_args();

        // default to decoding into an assoc array
        if (1 === \count($args)) {
            $args[] = true;
        }

        // run decode
        $array = \call_user_func_array('json_decode', $args);

        // turn errors into exceptions for easier catching
        if ($error = self::getJsonLastErrorMsg()) {
            throw new JSONParseException($error);
        }

        // output
        return $array;
    }