public interface JsonTextWriter extends TextWriter
Modifier and Type | Field and Description |
---|---|
static char[] |
hexdigits |
static String |
JSON_NL_ARROFARR |
static String |
JSON_NL_ARROFMAP |
static String |
JSON_NL_ARROFNTV |
static String |
JSON_NL_FLAT |
static String |
JSON_NL_MAP |
static String |
JSON_NL_STYLE |
Modifier and Type | Method and Description |
---|---|
void |
_writeChar(char c) |
void |
_writeStr(String s) |
String |
getNamedListStyle() |
default void |
unicodeEscape(Appendable out,
int ch) |
default void |
writeArray(String name,
Iterator val) |
default void |
writeArray(String name,
List l) |
default void |
writeArrayCloser() |
default void |
writeArrayOpener(int size) |
default void |
writeArraySeparator() |
default void |
writeBool(String name,
String val)
if this form of the method is called, val is the Java string form of a boolean
|
default void |
writeDate(String name,
String val)
if this form of the method is called, val is the Solr ISO8601 based date format
|
default void |
writeDouble(String name,
String val)
if this form of the method is called, val is the Java string form of a double
|
default void |
writeFloat(String name,
String val)
if this form of the method is called, val is the Java string form of a float
|
default void |
writeInt(String name,
String val)
if this form of the method is called, val is the Java string form of an int
|
default void |
writeIterator(IteratorWriter val)
Write an array.
|
default void |
writeJsonIter(Iterator val) |
default void |
writeKey(String fname,
boolean needsEscaping) |
default void |
writeLong(String name,
String val)
if this form of the method is called, val is the Java string form of a long
|
default void |
writeMap(MapWriter val)
Write a Map.
|
default void |
writeMap(String name,
Map val,
boolean excludeOuter,
boolean isFirstVal) |
default void |
writeMapCloser() |
default void |
writeMapOpener(int size) |
default void |
writeMapSeparator() |
default void |
writeNamedList(String name,
NamedList val) |
default void |
writeNamedListAsArrArr(String name,
NamedList val) |
default void |
writeNamedListAsArrMap(String name,
NamedList val) |
default void |
writeNamedListAsFlat(String name,
NamedList val) |
default void |
writeNamedListAsMapMangled(String name,
NamedList val)
Represents a NamedList directly as a JSON Object (essentially a Map)
Map null to "" and name mangle any repeated keys to avoid repeats in the
output.
|
default void |
writeNamedListAsMapWithDups(String name,
NamedList val)
Represents a NamedList directly as a JSON Object (essentially a Map)
repeating any keys if they are repeated in the NamedList.
|
default void |
writeNull(String name) |
default void |
writeStr(String name,
String val,
boolean needsEscaping) |
decLevel, doIndent, getWriter, incLevel, indent, indent, level, setIndent, writeArray, writeBool, writeBool, writeByteArr, writeDate, writeDouble, writeFloat, writeInt, writeLong, writeNumber, writeVal
static final char[] hexdigits
static final String JSON_NL_MAP
static final String JSON_NL_FLAT
static final String JSON_NL_ARROFARR
static final String JSON_NL_ARROFMAP
static final String JSON_NL_ARROFNTV
static final String JSON_NL_STYLE
String getNamedListStyle()
void _writeChar(char c) throws IOException
IOException
void _writeStr(String s) throws IOException
IOException
default void writeMapOpener(int size) throws IOException, IllegalArgumentException
IOException
IllegalArgumentException
default void writeMapSeparator() throws IOException
IOException
default void writeMapCloser() throws IOException
IOException
default void writeArrayOpener(int size) throws IOException, IllegalArgumentException
IOException
IllegalArgumentException
default void writeArraySeparator() throws IOException
IOException
default void writeArrayCloser() throws IOException
IOException
default void writeStr(String name, String val, boolean needsEscaping) throws IOException
writeStr
in interface TextWriter
IOException
default void writeIterator(IteratorWriter val) throws IOException
PushWriter
writeIterator
in interface PushWriter
writeIterator
in interface TextWriter
IOException
default void writeMap(MapWriter val) throws IOException
PushWriter
writeMap
in interface PushWriter
writeMap
in interface TextWriter
IOException
default void writeKey(String fname, boolean needsEscaping) throws IOException
IOException
default void writeJsonIter(Iterator val) throws IOException
IOException
default void writeNull(String name) throws IOException
writeNull
in interface TextWriter
IOException
default void writeInt(String name, String val) throws IOException
TextWriter
writeInt
in interface TextWriter
IOException
default void writeLong(String name, String val) throws IOException
TextWriter
writeLong
in interface TextWriter
IOException
default void writeBool(String name, String val) throws IOException
TextWriter
writeBool
in interface TextWriter
IOException
default void writeFloat(String name, String val) throws IOException
TextWriter
writeFloat
in interface TextWriter
IOException
default void writeDouble(String name, String val) throws IOException
TextWriter
writeDouble
in interface TextWriter
IOException
default void writeDate(String name, String val) throws IOException
TextWriter
writeDate
in interface TextWriter
IOException
default void writeMap(String name, Map val, boolean excludeOuter, boolean isFirstVal) throws IOException
writeMap
in interface TextWriter
IOException
default void writeArray(String name, List l) throws IOException
writeArray
in interface TextWriter
IOException
default void writeArray(String name, Iterator val) throws IOException
writeArray
in interface TextWriter
IOException
default void unicodeEscape(Appendable out, int ch) throws IOException
IOException
default void writeNamedList(String name, NamedList val) throws IOException
writeNamedList
in interface TextWriter
IOException
default void writeNamedListAsMapMangled(String name, NamedList val) throws IOException
IOException
default void writeNamedListAsMapWithDups(String name, NamedList val) throws IOException
IOException
default void writeNamedListAsArrMap(String name, NamedList val) throws IOException
IOException
default void writeNamedListAsArrArr(String name, NamedList val) throws IOException
IOException
default void writeNamedListAsFlat(String name, NamedList val) throws IOException
IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.