public function toJSON()
    {
        $finalQuery = "";

        if (isset($this->params['body'])) {
            $finalQuery = json_encode($this->params['body']);
        }


        return $finalQuery;
    }
public function toJSON()
    {
        $finalQuery = "";

        if (isset($this->params['body'])) {
            $finalQuery = json_encode($this->params['body']);
        }


        return $finalQuery;
    }
public function toJSON ( ) { $ finalQuery = "" ; if ( isset ( $ this -> params [ 'body' ] ) ) { $ finalQuery = json_encode ( $ this -> params [ 'body' ] ) ; } return $ finalQuery ; }
Return a JSON representation of the final search request

@return string
Return a JSON representation of the final search request