public class JsonWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
isPushed |
protected java.lang.Appendable |
out |
protected boolean |
pushedComma |
protected java.lang.String |
pushedName |
protected boolean |
strictStringEncoding |
Constructor and Description |
---|
JsonWriter(java.lang.Appendable out,
boolean strictStringEncoding) |
Modifier and Type | Method and Description |
---|---|
boolean |
isNamePopped()
|
protected void |
popName()
Writes stored name to JSON string.
|
void |
pushName(java.lang.String name,
boolean withComma)
Stores name to temporary stack.
|
protected void |
unicode(char c)
Writes unicode representation of a character.
|
protected void |
write(char c)
Appends char to the buffer.
|
void |
write(java.lang.CharSequence charSequence)
Appends char sequence to the buffer.
|
void |
writeCloseArray()
Writes close array sign.
|
void |
writeCloseObject()
Writes close object sign.
|
void |
writeComma()
Writes comma.
|
void |
writeName(java.lang.String name)
Writes object's property name: string and a colon.
|
void |
writeNumber(java.lang.Number number) |
void |
writeOpenArray()
Writes open array sign.
|
void |
writeOpenObject()
Writes open object sign.
|
void |
writeString(java.lang.String value)
Write a quoted and escaped value to the output.
|
protected final java.lang.Appendable out
protected final boolean strictStringEncoding
protected java.lang.String pushedName
protected boolean pushedComma
protected boolean isPushed
public JsonWriter(java.lang.Appendable out, boolean strictStringEncoding)
public void pushName(java.lang.String name, boolean withComma)
protected void popName()
public boolean isNamePopped()
public void writeOpenObject()
public void writeCloseObject()
public void writeName(java.lang.String name)
public void writeOpenArray()
public void writeCloseArray()
public void writeString(java.lang.String value)
protected void unicode(char c)
public void writeComma()
public void write(java.lang.CharSequence charSequence)
public void writeNumber(java.lang.Number number)
protected void write(char c)
Copyright © 2003-present Jodd Team