org.apache.felix.utils.json

## Class JSONWriter

- java.lang.Object
- - org.apache.felix.utils.json.JSONWriter

    public class JSONWriter
    extends Object

Simple JSON writer to be used on top of a `Writer`.

### Constructor Summary

Constructors
Constructor and Description
`JSONWriter(Writer pw)`

### Method Summary

All Methods Instance Methods Concrete Methods
`JSONWriter` `array()`
`JSONWriter` `endArray()`
`JSONWriter` `endObject()`
`void` `flush()`
`JSONWriter` `key(String key)`
`JSONWriter` `object()`
`JSONWriter` `value(boolean b)`
`JSONWriter` `value(double d)`
`JSONWriter` `value(int i)`
`JSONWriter` `value(long l)`
`JSONWriter` `value(Object value)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### JSONWriter

    public JSONWriter(Writer pw)

### Method Detail

#### object

    public JSONWriter object()
                      throws IOException

Throws:
  `IOException`

#### endObject

    public JSONWriter endObject()
                         throws IOException

Throws:
  `IOException`

#### array

    public JSONWriter array()
                     throws IOException

Throws:
  `IOException`

#### endArray

    public JSONWriter endArray()
                        throws IOException

Throws:
  `IOException`

#### key

    public JSONWriter key(String key)
                   throws IOException

Throws:
  `IOException`

#### value

    public JSONWriter value(boolean b)
                     throws IOException

Throws:
  `IOException`

#### value

    public JSONWriter value(double d)
                     throws IOException

Throws:
  `IOException`

#### value

    public JSONWriter value(int i)
                     throws IOException

Throws:
  `IOException`

#### value

    public JSONWriter value(long l)
                     throws IOException

Throws:
  `IOException`

#### value

    public JSONWriter value(Object value)
                     throws IOException

Throws:
  `IOException`

#### flush

    public void flush()
               throws IOException

Throws:
  `IOException` - when the underlying writer throws an exception.
See Also:
  `Writer.flush()`