public class JSONWriter extends TextResponseWriter implements JsonTextWriter
Modifier and Type | Field and Description |
---|---|
protected String |
namedListStyle |
protected String |
wrapperFunction |
cal, doIndent, level, req, returnFields, rsp, schema, writer
hexdigits, JSON_NL_ARROFARR, JSON_NL_ARROFMAP, JSON_NL_ARROFNTV, JSON_NL_FLAT, JSON_NL_MAP, JSON_NL_STYLE
Constructor and Description |
---|
JSONWriter(Writer writer,
SolrQueryRequest req,
SolrQueryResponse rsp) |
JSONWriter(Writer writer,
SolrQueryRequest req,
SolrQueryResponse rsp,
String wrapperFunction,
String namedListStyle) |
Modifier and Type | Method and Description |
---|---|
void |
_writeChar(char c) |
void |
_writeStr(String s) |
String |
getNamedListStyle() |
static void |
write(Writer writer,
boolean intend,
String namedListStyle,
Object val)
Strictly for testing only
|
void |
writeEndDocumentList() |
void |
writeResponse() |
void |
writeSolrDocument(String name,
SolrDocument doc,
ReturnFields returnFields,
int idx) |
void |
writeStartDocumentList(String name,
long start,
int size,
long numFound,
Float maxScore) |
close, decLevel, doIndent, getWriter, incLevel, level, setIndent, setLevel, writeDocuments, writeSolrDocumentList, writeVal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
unicodeEscape, writeArray, writeArray, writeArrayCloser, writeArrayOpener, writeArraySeparator, writeBool, writeDate, writeDouble, writeFloat, writeInt, writeIterator, writeJsonIter, writeKey, writeLong, writeMap, writeMap, writeMapCloser, writeMapOpener, writeMapSeparator, writeNamedList, writeNamedListAsArrArr, writeNamedListAsArrMap, writeNamedListAsFlat, writeNamedListAsMapMangled, writeNamedListAsMapWithDups, writeNull, writeStr
decLevel, doIndent, getWriter, incLevel, indent, indent, level, setIndent, writeArray, writeBool, writeBool, writeByteArr, writeDate, writeDouble, writeFloat, writeInt, writeLong, writeNumber, writeVal
protected final String namedListStyle
protected String wrapperFunction
public JSONWriter(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp)
public JSONWriter(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp, String wrapperFunction, String namedListStyle)
public static void write(Writer writer, boolean intend, String namedListStyle, Object val) throws IOException
IOException
public String getNamedListStyle()
getNamedListStyle
in interface JsonTextWriter
public void writeResponse() throws IOException
IOException
public void writeSolrDocument(String name, SolrDocument doc, ReturnFields returnFields, int idx) throws IOException
writeSolrDocument
in class TextResponseWriter
IOException
public void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore) throws IOException
writeStartDocumentList
in class TextResponseWriter
IOException
public void writeEndDocumentList() throws IOException
writeEndDocumentList
in class TextResponseWriter
IOException
public void _writeChar(char c) throws IOException
_writeChar
in interface JsonTextWriter
IOException
public void _writeStr(String s) throws IOException
_writeStr
in interface JsonTextWriter
IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.