Package org.apache.felix.utils.json
Class JSONWriter
- java.lang.Object
-
- org.apache.felix.utils.json.JSONWriter
-
public class JSONWriter extends java.lang.Object
Simple JSON writer to be used on top of aWriter
.
-
-
Constructor Summary
Constructors Constructor Description JSONWriter(java.io.Writer pw)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JSONWriter
array()
JSONWriter
endArray()
JSONWriter
endObject()
void
flush()
JSONWriter
key(java.lang.String key)
JSONWriter
object()
JSONWriter
value(boolean b)
JSONWriter
value(double d)
JSONWriter
value(int i)
JSONWriter
value(long l)
JSONWriter
value(java.lang.Object value)
-
-
-
Method Detail
-
object
public JSONWriter object() throws java.io.IOException
- Throws:
java.io.IOException
-
endObject
public JSONWriter endObject() throws java.io.IOException
- Throws:
java.io.IOException
-
array
public JSONWriter array() throws java.io.IOException
- Throws:
java.io.IOException
-
endArray
public JSONWriter endArray() throws java.io.IOException
- Throws:
java.io.IOException
-
key
public JSONWriter key(java.lang.String key) throws java.io.IOException
- Throws:
java.io.IOException
-
value
public JSONWriter value(boolean b) throws java.io.IOException
- Throws:
java.io.IOException
-
value
public JSONWriter value(double d) throws java.io.IOException
- Throws:
java.io.IOException
-
value
public JSONWriter value(int i) throws java.io.IOException
- Throws:
java.io.IOException
-
value
public JSONWriter value(long l) throws java.io.IOException
- Throws:
java.io.IOException
-
value
public JSONWriter value(java.lang.Object value) throws java.io.IOException
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
Writer.flush()
-
-