|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JsonArrayBuilder<T>
Helps in building a JSON array. This is an intermediary class and the
actual build process is started from JsonBuilder or
JsonGenerator
JsonBuilder,
JsonGenerator| Method Summary | |
|---|---|
JsonArrayBuilder<T> |
add(BigDecimal value)
Adds the specified value as a JSON number value to the array that is being built. |
JsonArrayBuilder<T> |
add(BigInteger value)
Adds the specified value as a JSON number value to the array that is being built. |
JsonArrayBuilder<T> |
add(boolean value)
Adds a JSON true or false value to the array that is being built. |
JsonArrayBuilder<T> |
add(double value)
Adds the specified value as a JSON number value to the array that is being built. |
JsonArrayBuilder<T> |
add(int value)
Adds the specified value as a JSON number value to the array that is being built. |
JsonArrayBuilder<T> |
add(JsonValue value)
Adds the specified value to the array that is being built. |
JsonArrayBuilder<T> |
add(long value)
Adds the specified value as a JSON number value to the array that is being built. |
JsonArrayBuilder<T> |
add(String value)
Adds the specified value as a JSON string value to the array that is being built. |
JsonArrayBuilder<T> |
addNull()
Adds the JSON null value to the array that is being built. |
JsonArrayBuilder<JsonArrayBuilder<T>> |
beginArray()
Returns a JSON array builder to build a new array value |
JsonObjectBuilder<JsonArrayBuilder<T>> |
beginObject()
Returns a JSON array builder to build a new object value |
T |
endArray()
Indicates the end of the JSON array that is being built. |
| Method Detail |
|---|
T endArray()
IllegalStateException - when endArray method is already
called.JsonArrayBuilder<T> add(JsonValue value)
value -
IllegalStateException - when invoked after endArray method is
called.JsonArrayBuilder<T> add(String value)
value - string
IllegalStateException - when invoked after endArray method is
called.JsonArrayBuilder<T> add(BigDecimal value)
value - a number
IllegalStateException - when invoked after endArray method is
called.JsonNumberJsonArrayBuilder<T> add(BigInteger value)
value - a number
IllegalStateException - when invoked after endArray method is
called.JsonNumberJsonArrayBuilder<T> add(int value)
value - a number
IllegalStateException - when invoked after endArray method is
called.JsonNumberJsonArrayBuilder<T> add(long value)
value - a number
IllegalStateException - when invoked after endArray method is
called.JsonNumberJsonArrayBuilder<T> add(double value)
value - a number
IllegalStateException - when invoked after endArray method is
called.
NumberFormatException - if value is Not-a-Number(NaN) or infinityJsonNumberJsonArrayBuilder<T> add(boolean value)
TODO not needed since add(JsonValue.TRUE|FALSE) can be used ??
value - a boolean
IllegalStateException - when invoked after endArray method is
called.JsonArrayBuilder<T> addNull()
TODO not needed since add(JsonValue.NULL) can be used ??
IllegalStateException - when invoked after endArray method is
called.JsonObjectBuilder<JsonArrayBuilder<T>> beginObject()
IllegalStateException - when invoked after endArray method is
called.JsonArrayBuilder<JsonArrayBuilder<T>> beginArray()
IllegalStateException - when invoked after endArray method is
called.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||