public class JsonReader extends Object implements SearchResultReader
Reader and returns a SearchResult.| Modifier and Type | Class and Description | 
|---|---|
| private static class  | JsonReader.SearchResultDeserializerDeserializes a  SearchResultby iterating over the json elements. | 
| Modifier and Type | Field and Description | 
|---|---|
| private com.google.gson.Gson | gsonTo convert JSON to a search result. | 
| private Reader | jsonReaderReader to read from. | 
| Constructor and Description | 
|---|
| JsonReader(Reader reader)Creates a new json reader. | 
| JsonReader(Reader reader,
          SortBehavior sb)Creates a new json reader. | 
| Modifier and Type | Method and Description | 
|---|---|
| SearchResult | read()Reads JSON data from the reader and returns a search result. | 
private final Reader jsonReader
private final com.google.gson.Gson gson
public JsonReader(Reader reader)
reader - to read JSON frompublic JsonReader(Reader reader, SortBehavior sb)
reader - to read JSON fromsb - sort behavior of the search resultpublic SearchResult read() throws IOException
read in interface SearchResultReaderIOException - if an error occurs using the readerCopyright © 2003-2019 Virginia Tech. All Rights Reserved.