src/Parser.php
public function fromJson(string $json): array
    {
        if (!$this->isEmptyValue($json)) {

            if ($decode = json_decode(trim($json), true) and json_last_error() == JSON_ERROR_NONE)
                $this->result = $decode;
            else
                $this->setError(json_last_error(), json_last_error_msg());
        }

        return $this->result;
    }
public function fromJson(string $json): array
    {
        if (!$this->isEmptyValue($json)) {

            if ($decode = json_decode(trim($json), true) and json_last_error() == JSON_ERROR_NONE)
                $this->result = $decode;
            else
                $this->setError(json_last_error(), json_last_error_msg());
        }

        return $this->result;
    }
public function fromJson ( string $ json ) : array { if ( ! $ this -> isEmptyValue ( $ json ) ) { if ( $ decode = json_decode ( trim ( $ json ) , true ) and json_last_error ( ) == JSON_ERROR_NONE ) $ this -> result = $ decode ; else $ this -> setError ( json_last_error ( ) , json_last_error_msg ( ) ) ; } return $ this -> result ; }
Convert json to array

@param string $json
@return array|mixed
Convert json to array