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, writerhexdigits, 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() |
protected int |
headerSize(Float maxScore,
Boolean numFoundExact) |
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)
Deprecated.
|
void |
writeStartDocumentList(String name,
long start,
int size,
long numFound,
Float maxScore,
Boolean numFoundExact) |
close, decLevel, doIndent, getWriter, incLevel, level, setIndent, setLevel, writeDocuments, writeSolrDocumentList, writeValclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitunicodeEscape, 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, writeStrdecLevel, doIndent, getWriter, incLevel, indent, indent, level, setIndent, writeArray, writeBool, writeBool, writeByteArr, writeDate, writeDouble, writeFloat, writeInt, writeLong, writeNumber, writeValprotected 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
IOExceptionpublic String getNamedListStyle()
getNamedListStyle in interface JsonTextWriterpublic void writeResponse()
throws IOException
IOExceptionpublic void writeSolrDocument(String name, SolrDocument doc, ReturnFields returnFields, int idx) throws IOException
writeSolrDocument in class TextResponseWriterIOException@Deprecated public void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore) throws IOException
writeStartDocumentList(String, long, int, long, Float, Boolean).writeStartDocumentList in class TextResponseWriterIOExceptionpublic void writeStartDocumentList(String name, long start, int size, long numFound, Float maxScore, Boolean numFoundExact) throws IOException
writeStartDocumentList in class TextResponseWriterIOExceptionpublic void writeEndDocumentList()
throws IOException
writeEndDocumentList in class TextResponseWriterIOExceptionpublic void _writeChar(char c)
throws IOException
_writeChar in interface JsonTextWriterIOExceptionpublic void _writeStr(String s) throws IOException
_writeStr in interface JsonTextWriterIOExceptionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.