Interface JsonBuilder<T extends JsonBuilder<T>>
- Type Parameters:
T- the builder return type
public interface JsonBuilder<T extends JsonBuilder<T>>
Creates Json objects. Abstracted from JavaEE/glassfisch.
- Author:
- Holger Eichelberger, SSE
-
Method Summary
Modifier and TypeMethodDescriptionAdds a name/value pair to the JSON object associated with this object builder.Adds a name/value pair to the JSON object associated with this object builder.Adds a name/value pair to the JSON object associated with this object builder.Adds a name/value pair to the JSON object associated with this object builder.add(String name, JsonArrayBuilder builder) Adds a name/value pair to the JSON object associated with this object builder via an array builder.add(String name, JsonNumber value) Adds a name/value pair to the JSON object associated with this object builder.add(String name, JsonObject value) Adds a name/value pair to the JSON object associated with this object builder.add(String name, JsonObjectBuilder builder) Adds a name/value pair to the JSON object associated with this object builder via an object builder.add(String name, JsonString value) Adds a name/value pair to the JSON object associated with this object builder.Adds a name/value pair to the JSON object associated with this object builder.Adds a name/null pair to the JSON object associated with this object builder.Remove the name/value pair from the JSON object associated with this object builder if it is present.
-
Method Details
-
add
Adds a name/value pair to the JSON object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-
add
Adds a name/value pair to the JSON object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-
add
Adds a name/value pair to the JSON object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-
add
Adds a name/value pair to the JSON object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-
add
Adds a name/value pair to the JSON object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-
add
Adds a name/value pair to the JSON object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-
add
Adds a name/value pair to the JSON object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-
add
Adds a name/value pair to the JSON object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-
addNull
Adds a name/null pair to the JSON object associated with this object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pair- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-
add
Adds a name/value pair to the JSON object associated with this object builder via an array builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairbuilder- the array builder- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-
add
Adds a name/value pair to the JSON object associated with this object builder via an object builder. If the object contains a mapping for the specified name, this method replaces the old value with the specified value.- Parameters:
name- name in the name/value pairbuilder- the object builder- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-
remove
Remove the name/value pair from the JSON object associated with this object builder if it is present.- Parameters:
name- the name in the name/value pair to be removed- Returns:
- this for chaining
- Throws:
NullPointerException- if the specified name is null
-