@Beta public class MockJsonGenerator extends JsonGenerator
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the serializer and the underlying output stream or writer, and releases any memory associated with it.
|
void |
flush()
Flushes any buffered content to the underlying output stream or writer.
|
JsonFactory |
getFactory()
Returns the JSON factory from which this generator was created.
|
void |
writeBoolean(boolean state)
Writes a literal JSON boolean value ('true' or 'false').
|
void |
writeEndArray()
Writes a JSON end array character ']'.
|
void |
writeEndObject()
Writes a JSON end object character '}'.
|
void |
writeFieldName(String
Writes a JSON quoted field name.
|
void |
writeNull()
Writes a literal JSON null value.
|
void |
writeNumber(BigDecimal
Writes a JSON big decimal value.
|
void |
writeNumber(BigInteger
Writes a JSON big integer value.
|
void |
writeNumber(double v)
Writes a JSON double value.
|
void |
writeNumber(float v)
Writes a JSON float value.
|
void |
writeNumber(int v)
Writes a JSON int value.
|
void |
writeNumber(long v)
Writes a JSON long value.
|
void |
writeNumber(String
Writes a JSON numeric value that has already been encoded properly.
|
void |
writeStartArray()
Writes a JSON start array character '['.
|
void |
writeStartObject()
Writes a JSON start object character '{'.
|
void |
writeString(String
Writes a JSON quoted string value.
|
enablePrettyPrint, serializepublic JsonFactorygetFactory()
JsonGenerator
public void flush()
throws IOException
JsonGenerator
flush in class
JsonGenerator
IOException
public void close()
throws IOException
JsonGenerator
close in class
JsonGenerator
IOException
public void writeStartArray()
throws IOException
JsonGenerator
writeStartArray in class
JsonGenerator
IOException
public void writeEndArray()
throws IOException
JsonGenerator
writeEndArray in class
JsonGenerator
IOException
public void writeStartObject()
throws IOException
JsonGenerator
writeStartObject in class
JsonGenerator
IOException
public void writeEndObject()
throws IOException
JsonGenerator
writeEndObject in class
JsonGenerator
IOException
public void writeFieldName(Stringname) throws IOException
JsonGenerator
writeFieldName in class
JsonGenerator
IOException
public void writeNull()
throws IOException
JsonGenerator
writeNull in class
JsonGenerator
IOException
public void writeString(Stringvalue) throws IOException
JsonGenerator
writeString in class
JsonGenerator
IOException
public void writeBoolean(boolean state)
throws IOException
JsonGenerator
writeBoolean in class
JsonGenerator
IOException
public void writeNumber(int v)
throws IOException
JsonGenerator
writeNumber in class
JsonGenerator
IOException
public void writeNumber(long v)
throws IOException
JsonGenerator
writeNumber in class
JsonGenerator
IOException
public void writeNumber(BigIntegerv) throws IOException
JsonGenerator
writeNumber in class
JsonGenerator
IOException
public void writeNumber(float v)
throws IOException
JsonGenerator
writeNumber in class
JsonGenerator
IOException
public void writeNumber(double v)
throws IOException
JsonGenerator
writeNumber in class
JsonGenerator
IOException
public void writeNumber(BigDecimalv) throws IOException
JsonGenerator
writeNumber in class
JsonGenerator
IOException
public void writeNumber(StringencodedValue) throws IOException
JsonGenerator
writeNumber in class
JsonGenerator
IOException