Package org.glassfish.json
Class JsonObjectBuilderImpl
java.lang.Object
org.glassfish.json.JsonObjectBuilderImpl
- All Implemented Interfaces:
JsonObjectBuilder
JsonObjectBuilder impl
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a name/JsonValue#TRUEor name/JsonValue#FALSEpair to the JSON object associated with this object builder.Adds a name/JsonNumberpair to the JSON object associated with this object builder.Adds a name/JsonNumberpair to the JSON object associated with this object builder.Adds a name/JsonNumberpair to the JSON object associated with this object builder.Adds a name/JsonStringpair to the JSON object associated with this object builder.add(String name, BigDecimal value) Adds a name/JsonNumberpair to the JSON object associated with this object builder.add(String name, BigInteger value) Adds a name/JsonNumberpair to the JSON object associated with this object builder.add(String name, JsonArrayBuilder builder) Adds a name/JsonArraypair to the JSON object associated with this object builder.add(String name, JsonObjectBuilder builder) Adds a name/JsonObjectpair to the JSON object associated with this object builder.Adds a name/JsonValuepair to the JSON object associated with this object builder.Adds a name/JsonValue#NULLpair to the JSON object associated with this object builder where the value isnull.build()Returns the JSON object associated with this object builder.private voidputValueMap(String name, JsonValue value) private voidvalidateName(String name) private voidvalidateValue(Object value)
-
Field Details
-
valueMap
-
bufferPool
-
-
Constructor Details
-
JsonObjectBuilderImpl
JsonObjectBuilderImpl(BufferPool bufferPool)
-
-
Method Details
-
add
Description copied from interface:JsonObjectBuilderAdds a name/JsonValuepair 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.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
-
add
Description copied from interface:JsonObjectBuilderAdds a name/JsonStringpair 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.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
-
add
Description copied from interface:JsonObjectBuilderAdds a name/JsonNumberpair 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.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
- See Also:
-
add
Description copied from interface:JsonObjectBuilderAdds a name/JsonNumberpair 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.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
- See Also:
-
add
Description copied from interface:JsonObjectBuilderAdds a name/JsonNumberpair 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.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
- See Also:
-
add
Description copied from interface:JsonObjectBuilderAdds a name/JsonNumberpair 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.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
- See Also:
-
add
Description copied from interface:JsonObjectBuilderAdds a name/JsonNumberpair 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.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
- See Also:
-
add
Description copied from interface:JsonObjectBuilderAdds a name/JsonValue#TRUEor name/JsonValue#FALSEpair 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.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- name in the name/value pairvalue- value in the name/value pair- Returns:
- this object builder
-
addNull
Description copied from interface:JsonObjectBuilderAdds a name/JsonValue#NULLpair to the JSON object associated with this object builder where the value isnull. If the object contains a mapping for the specified name, this method replaces the old value withnull.- Specified by:
addNullin interfaceJsonObjectBuilder- Parameters:
name- name in the name/value pair- Returns:
- this object builder
-
add
Description copied from interface:JsonObjectBuilderAdds a name/JsonObjectpair to the JSON object associated with this object builder. The valueJsonObjectis built from the specified object builder. If the object contains a mapping for the specified name, this method replaces the old value with theJsonObjectfrom the specified object builder.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- name in the name/value pairbuilder- the value is the object associated with this builder- Returns:
- this object builder
-
add
Description copied from interface:JsonObjectBuilderAdds a name/JsonArraypair to the JSON object associated with this object builder. The valueJsonArrayis built from the specified array builder. If the object contains a mapping for the specified name, this method replaces the old value with theJsonArrayfrom the specified array builder.- Specified by:
addin interfaceJsonObjectBuilder- Parameters:
name- the name in the name/value pairbuilder- the value is the object array with this builder- Returns:
- this object builder
-
build
Description copied from interface:JsonObjectBuilderReturns the JSON object associated with this object builder. The iteration order for theJsonObjectis based on the order in which name/value pairs are added to the object using this builder.- Specified by:
buildin interfaceJsonObjectBuilder- Returns:
- JSON object that is being built
-
putValueMap
-
validateName
-
validateValue
-