public function asJSON() : string
    {
        $fields = [];

        foreach($this->_data as $key => $value) {
            if(!is_object($value)) {
                $fields[$key] = $value;
            }
        }

        return json_encode($fields);
    }
public function asJSON() : string
    {
        $fields = [];

        foreach($this->_data as $key => $value) {
            if(!is_object($value)) {
                $fields[$key] = $value;
            }
        }

        return json_encode($fields);
    }
public function asJSON ( ) : string { $ fields = [ ] ; foreach ( $ this -> _data as $ key => $ value ) { if ( ! is_object ( $ value ) ) { $ fields [ $ key ] = $ value ; } } return json_encode ( $ fields ) ; }
Returns values as a JSON.

@return string Encoded JSON.
Returns values as a JSON .