public class JsonWriter extends Object
Modifier and Type | Field and Description |
---|---|
protected net.morimekta.util.json.JsonContext |
context |
static String |
kFalse |
static String |
kNull |
static String |
kTrue |
Constructor and Description |
---|
JsonWriter(OutputStream out) |
JsonWriter(PrintWriter writer) |
Modifier and Type | Method and Description |
---|---|
JsonWriter |
array() |
JsonWriter |
endArray() |
JsonWriter |
endObject() |
void |
flush() |
JsonWriter |
key(Binary key) |
JsonWriter |
key(boolean key) |
JsonWriter |
key(byte key) |
JsonWriter |
key(CharSequence key) |
JsonWriter |
key(double key) |
JsonWriter |
key(int key) |
JsonWriter |
key(long key) |
JsonWriter |
key(short key) |
JsonWriter |
keyLiteral(CharSequence key) |
JsonWriter |
object() |
protected void |
reset() |
protected void |
startKey() |
protected boolean |
startValue() |
JsonWriter |
value(Binary value) |
JsonWriter |
value(boolean value) |
JsonWriter |
value(byte value) |
JsonWriter |
value(CharSequence value) |
JsonWriter |
value(double number) |
JsonWriter |
value(int value) |
JsonWriter |
value(long number) |
JsonWriter |
value(short value) |
JsonWriter |
valueLiteral(CharSequence value) |
public static final String kNull
public static final String kTrue
public static final String kFalse
protected net.morimekta.util.json.JsonContext context
public JsonWriter(OutputStream out)
public JsonWriter(PrintWriter writer)
protected void reset()
public void flush()
public JsonWriter object() throws JsonException
JsonException
public JsonWriter array() throws JsonException
JsonException
public JsonWriter endObject() throws JsonException
JsonException
public JsonWriter endArray() throws JsonException
JsonException
public JsonWriter key(boolean key) throws JsonException
JsonException
public JsonWriter key(byte key) throws JsonException
JsonException
public JsonWriter key(short key) throws JsonException
JsonException
public JsonWriter key(int key) throws JsonException
JsonException
public JsonWriter key(long key) throws JsonException
JsonException
public JsonWriter key(double key) throws JsonException
JsonException
public JsonWriter key(CharSequence key) throws JsonException
JsonException
public JsonWriter key(Binary key) throws JsonException
JsonException
public JsonWriter keyLiteral(CharSequence key) throws JsonException
JsonException
public JsonWriter value(boolean value) throws JsonException
JsonException
public JsonWriter value(byte value) throws JsonException
JsonException
public JsonWriter value(short value) throws JsonException
JsonException
public JsonWriter value(int value) throws JsonException
JsonException
public JsonWriter value(long number) throws JsonException
JsonException
public JsonWriter value(double number) throws JsonException
JsonException
public JsonWriter value(CharSequence value) throws JsonException
JsonException
public JsonWriter value(Binary value) throws JsonException
JsonException
public JsonWriter valueLiteral(CharSequence value) throws JsonException
JsonException
protected void startKey() throws JsonException
JsonException
protected boolean startValue() throws JsonException
JsonException
Copyright © 2017. All rights reserved.