package cn.citycraft.GsonAgent.api.stream;

import java.io.Closeable;
import java.io.Flushable;
import java.io.IOException;

public abstract interface JsonWriter extends Closeable, Flushable {

	public JsonWriter beginArray() throws IOException;

	public JsonWriter beginObject() throws IOException;

	@Override
	public void close() throws IOException;

	public JsonWriter endArray() throws IOException;

	public JsonWriter endObject() throws IOException;

	@Override
	public void flush() throws IOException;

	public boolean getSerializeNulls();

	public boolean isHtmlSafe();

	public boolean isLenient();

	public JsonWriter name(String name) throws IOException;

	public JsonWriter nameWithoutQuotes(String name) throws IOException;

	public JsonWriter nullValue() throws IOException;

	public void setHtmlSafe(boolean htmlSafe);

	public void setIndent(String indent);

	public void setLenient(boolean lenient);

	public void setSerializeNulls(boolean serializeNulls);

	public JsonWriter value(boolean value) throws IOException;

	public JsonWriter value(double value) throws IOException;

	public JsonWriter value(long value) throws IOException;

	public JsonWriter value(Number value) throws IOException;

	public JsonWriter value(String value) throws IOException;

	void string(String value) throws IOException;

}
