public function read(bool $assoc = false)
    {
        $json = json_decode(parent::read(), $assoc);
        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new RuntimeException('Invalid json file');
        }
        return $json;
    }
public function read(bool $assoc = false)
    {
        $json = json_decode(parent::read(), $assoc);
        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new RuntimeException('Invalid json file');
        }
        return $json;
    }
public function read ( bool $ assoc = false ) { $ json = json_decode ( parent :: read ( ) , $ assoc ) ; if ( json_last_error ( ) !== JSON_ERROR_NONE ) { throw new RuntimeException ( 'Invalid json file' ) ; } return $ json ; }
Read and decode the json file

@param  bool $assoc
@return \stdClass|array|null
Read and decode the json file