public class JsonStream extends Object implements AutoCloseable
Constructor and Description |
---|
JsonStream(Writer writer) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
JsonStream |
put(String key,
boolean value) |
JsonStream |
put(String key,
Collection<?> value) |
JsonStream |
put(String key,
double value) |
JsonStream |
put(String key,
float value) |
JsonStream |
put(String key,
int value) |
JsonStream |
put(String key,
com.opensymphony.webwork.dispatcher.json.JSONObject value) |
JsonStream |
put(String key,
long value) |
JsonStream |
put(String key,
Map value) |
JsonStream |
put(String key,
Object value) |
JsonStream |
putIfNotNull(String key,
Object value) |
void |
writeArrayFieldStart(String fieldName) |
void |
writeEndArray() |
void |
writeEndObject() |
void |
writeStartObject() |
public JsonStream(Writer writer) throws IOException
IOException
public void writeArrayFieldStart(String fieldName) throws IOException
IOException
public void writeStartObject() throws IOException
IOException
public void writeEndObject() throws IOException
IOException
public void writeEndArray() throws IOException
IOException
public JsonStream put(String key, boolean value) throws IOException
IOException
public JsonStream put(String key, int value) throws IOException
IOException
public JsonStream put(String key, long value) throws IOException
IOException
public JsonStream put(String key, float value) throws IOException
IOException
public JsonStream put(String key, double value) throws IOException
IOException
public JsonStream putIfNotNull(@NotNull String key, @Nullable Object value) throws IOException
IOException
public JsonStream put(@NotNull String key, @NotNull Object value) throws IOException
IOException
public JsonStream put(String key, com.opensymphony.webwork.dispatcher.json.JSONObject value) throws IOException
IOException
public JsonStream put(String key, Collection<?> value) throws IOException
IOException
public JsonStream put(String key, Map value) throws IOException
IOException
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.