Interface ApiResponse

All Known Implementing Classes:
ErrorResponse, ImageSearchApiResponse, NewsSearchApiResponse, SpellcheckSearchApiResponse, SuggestSearchApiResponse, VideoSearchApiResponse, WebSearchApiResponse

This marker interface represents the API response objects from the Brave Search API. Implementing classes are meant to be deserialised and served as Plain Old Java Objects (POJOs).
  • Method Summary

    Modifier and Type
    Method
    Description
    Serializes the response object to a JSON string.
    void
    write(File file)
    Writes the response object to a file on the filesystem.
  • Method Details

    • toJson

      String toJson()
      Serializes the response object to a JSON string.
      Returns:
      a JSON string representation of the response object.
    • write

      void write(File file)
      Writes the response object to a file on the filesystem.
      Parameters:
      file - the file to write the response object to.