Class JsonStreamWriter
- java.lang.Object
-
- org.apache.olingo.odata2.core.ep.util.JsonStreamWriter
-
public class JsonStreamWriter extends Object
Writes JSON output.
-
-
Constructor Summary
Constructors Constructor Description JsonStreamWriter(Writer writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonStreamWriterbeginArray()JsonStreamWriterbeginObject()JsonStreamWriterendArray()JsonStreamWriterendObject()protected voidescape(String value)Writes the JSON-escaped form of a Java String value according to RFC 4627.JsonStreamWritername(String name)JsonStreamWriternamedStringValue(String name, String value)JsonStreamWriternamedStringValueRaw(String name, String value)JsonStreamWriterseparator()JsonStreamWriterstringValue(String value)JsonStreamWriterstringValueRaw(String value)JsonStreamWriterunquotedValue(String value)
-
-
-
Constructor Detail
-
JsonStreamWriter
public JsonStreamWriter(Writer writer)
-
-
Method Detail
-
beginObject
public JsonStreamWriter beginObject() throws IOException
- Throws:
IOException
-
endObject
public JsonStreamWriter endObject() throws IOException
- Throws:
IOException
-
beginArray
public JsonStreamWriter beginArray() throws IOException
- Throws:
IOException
-
endArray
public JsonStreamWriter endArray() throws IOException
- Throws:
IOException
-
name
public JsonStreamWriter name(String name) throws IOException
- Throws:
IOException
-
unquotedValue
public JsonStreamWriter unquotedValue(String value) throws IOException
- Throws:
IOException
-
stringValueRaw
public JsonStreamWriter stringValueRaw(String value) throws IOException
- Throws:
IOException
-
stringValue
public JsonStreamWriter stringValue(String value) throws IOException
- Throws:
IOException
-
namedStringValueRaw
public JsonStreamWriter namedStringValueRaw(String name, String value) throws IOException
- Throws:
IOException
-
namedStringValue
public JsonStreamWriter namedStringValue(String name, String value) throws IOException
- Throws:
IOException
-
separator
public JsonStreamWriter separator() throws IOException
- Throws:
IOException
-
escape
protected void escape(String value) throws IOException
Writes the JSON-escaped form of a Java String value according to RFC 4627.- Parameters:
value- the Java String- Throws:
IOException- if an I/O error occurs
-
-