public class JsonWriter extends Object implements SearchResultWriter
SearchResult
as JSON to a Writer
.Constructor and Description |
---|
JsonWriter(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(Writer writer)
writer
- to write JSON topublic void write(SearchResult result) throws IOException
write
in interface SearchResultWriter
result
- search result to writeIOException
- if an error occurs using the writerCopyright © 2016. All rights reserved.