|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JsonObjectBuilder<T>
Helps in building a JSON object. This is an intermediary class and the
actual build process is started from JsonBuilder or
JsonGenerator
JsonBuilder,
JsonGenerator| Method Summary | |
|---|---|
JsonObjectBuilder<T> |
add(String name,
BigDecimal value)
Associates the specified value with the specified name/key in the JSON object that is being built. |
JsonObjectBuilder<T> |
add(String name,
BigInteger value)
Associates the specified value with the specified name/key in the JSON object that is being built. |
JsonObjectBuilder<T> |
add(String name,
boolean value)
Associates the specified value with the specified name/key in the JSON object that is being built. |
JsonObjectBuilder<T> |
add(String name,
double value)
Associates the specified value with the specified name/key in the JSON object that is being built. |
JsonObjectBuilder<T> |
add(String name,
int value)
Associates the specified value with the specified name/key in the JSON object that is being built. |
JsonObjectBuilder<T> |
add(String name,
JsonValue value)
Associates the specified value with the specified name/key in the JSON object that is being built. |
JsonObjectBuilder<T> |
add(String name,
long value)
Associates the specified value with the specified name/key in the JSON object that is being built. |
JsonObjectBuilder<T> |
add(String name,
String value)
Associates the specified value with the specified name/key in the JSON object that is being built. |
JsonObjectBuilder<T> |
addNull(String name)
Associates the specified value with the specified name/key in the JSON object that is being built. |
JsonArrayBuilder<JsonObjectBuilder<T>> |
beginArray(String name)
Associates the specified value with the specified name/key in the JSON object that is being built. |
JsonObjectBuilder<JsonObjectBuilder<T>> |
beginObject(String name)
Associates the specified value with the specified name/key in the JSON object that is being built. |
T |
endObject()
Indicates the end of the JSON object that is being built. |
| Method Detail |
|---|
T endObject()
IllegalStateException - when endObject method
is already called
JsonObjectBuilder<T> add(String name,
JsonValue value)
name - name/key with which the specified value is to be associatedvalue - value to be associated with the specified name/key
JsonException - if there is a mapping for the specified name/key
in the JSON object
IllegalStateException - when invoked after the endObject method
is called
JsonObjectBuilder<T> add(String name,
String value)
name - name/key with which the specified value is to be associatedvalue - value to be associated with the specified name/key
JsonException - if there is a mapping for the specified name/key
in the JSON object
IllegalStateException - when invoked after the endObject method
is called
JsonObjectBuilder<T> add(String name,
BigInteger value)
name - name/key with which the specified value is to be associatedvalue - value to be associated with the specified name/key
JsonException - if there is a mapping for the specified name/key
in the JSON object
IllegalStateException - when invoked after the endObject method
is calledJsonNumber
JsonObjectBuilder<T> add(String name,
BigDecimal value)
name - name/key with which the specified value is to be associatedvalue - value to be associated with the specified name/key
JsonException - if there is a mapping for the specified name/key
in the JSON object
IllegalStateException - when invoked after the endObject method
is calledJsonNumber
JsonObjectBuilder<T> add(String name,
int value)
name - name/key with which the specified value is to be associatedvalue - value to be associated with the specified name/key
JsonException - if there is a mapping for the specified name/key
in the JSON object
IllegalStateException - when invoked after the endObject method
is calledJsonNumber
JsonObjectBuilder<T> add(String name,
long value)
name - name/key with which the specified value is to be associatedvalue - value to be associated with the specified name/key
JsonException - if there is a mapping for the specified name/key
in the JSON object
IllegalStateException - when invoked after the endObject method
is calledJsonNumber
JsonObjectBuilder<T> add(String name,
double value)
name - name/key with which the specified value is to be associatedvalue - value to be associated with the specified name/key
JsonException - if there is a mapping for the specified name/key
in the JSON object
IllegalStateException - when invoked after the endObject method
is called
NumberFormatException - if value is Not-a-Number(NaN) or infinityJsonNumber
JsonObjectBuilder<T> add(String name,
boolean value)
TODO not needed since add(JsonValue.TRUE|FALSE) can be used ??
name - name/key with which the specified value is to be associatedvalue - value to be associated with the specified name/key
JsonException - if there is a mapping for the specified name/key
in the JSON object
IllegalStateException - when invoked after the endObject method
is calledJsonObjectBuilder<T> addNull(String name)
TODO not needed since add(JsonValue.NULL) can be used ??
name - name/key with which the specified value is to be associated
JsonException - if there is a mapping for the specified name/key
in the JSON object
IllegalStateException - when invoked after the endObject method
is calledJsonObjectBuilder<JsonObjectBuilder<T>> beginObject(String name)
name - name/key with which the specified value is to be associated
JsonException - if there is a mapping for the specified name/key
in the JSON object
IllegalStateException - when invoked after the endObject method
is calledJsonArrayBuilder<JsonObjectBuilder<T>> beginArray(String name)
name - name/key with which the specified value is to be associated
JsonException - if there is a mapping for the specified name/key
in the JSON object
IllegalStateException - when invoked after the endObject method
is called
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||