public class JsonWriter extends java.lang.Object implements SearchResultWriter
SearchResult as JSON to a Writer.| Modifier and Type | Field and Description |
|---|---|
private java.io.Writer |
jsonWriter
Writer to write to.
|
| Constructor and Description |
|---|
JsonWriter(java.io.Writer writer)
Creates a new json writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
write(SearchResult result)
Writes the supplied search result to the writer.
|
public JsonWriter(java.io.Writer writer)
writer - to write JSON topublic void write(SearchResult result) throws java.io.IOException
write in interface SearchResultWriterresult - search result to writejava.io.IOException - if an error occurs using the writer