Package org.apache.johnzon.core
Class JsonObjectBuilderImpl
- java.lang.Object
-
- org.apache.johnzon.core.JsonObjectBuilderImpl
-
- All Implemented Interfaces:
jakarta.json.JsonObjectBuilder
,Serializable
class JsonObjectBuilderImpl extends Object implements jakarta.json.JsonObjectBuilder, Serializable
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,jakarta.json.JsonValue>
attributeMap
private BufferStrategy.BufferProvider<char[]>
bufferProvider
private JsonProviderImpl
provider
private RejectDuplicateKeysMode
rejectDuplicateKeysMode
-
Constructor Summary
Constructors Modifier Constructor Description protected
JsonObjectBuilderImpl()
JsonObjectBuilderImpl(jakarta.json.JsonObject initialData, BufferStrategy.BufferProvider<char[]> bufferProvider, RejectDuplicateKeysMode rejectDuplicateKeysMode, JsonProviderImpl provider)
JsonObjectBuilderImpl(Map<String,Object> initialValues, BufferStrategy.BufferProvider<char[]> bufferProvider, RejectDuplicateKeysMode rejectDuplicateKeysMode, JsonProviderImpl provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.json.JsonObjectBuilder
add(String name, boolean value)
jakarta.json.JsonObjectBuilder
add(String name, double value)
jakarta.json.JsonObjectBuilder
add(String name, int value)
jakarta.json.JsonObjectBuilder
add(String name, long value)
jakarta.json.JsonObjectBuilder
add(String name, jakarta.json.JsonArrayBuilder builder)
jakarta.json.JsonObjectBuilder
add(String name, jakarta.json.JsonObjectBuilder builder)
jakarta.json.JsonObjectBuilder
add(String name, jakarta.json.JsonValue value)
void
add(String name, Object value)
Internal method to add a value where we do not yet know the type at compile time.jakarta.json.JsonObjectBuilder
add(String name, String value)
jakarta.json.JsonObjectBuilder
add(String name, BigDecimal value)
jakarta.json.JsonObjectBuilder
add(String name, BigInteger value)
jakarta.json.JsonObjectBuilder
addAll(jakarta.json.JsonObjectBuilder builder)
jakarta.json.JsonObjectBuilder
addNull(String name)
jakarta.json.JsonObject
build()
private void
putValue(String name, jakarta.json.JsonValue value)
jakarta.json.JsonObjectBuilder
remove(String name)
-
-
-
Field Detail
-
rejectDuplicateKeysMode
private RejectDuplicateKeysMode rejectDuplicateKeysMode
-
provider
private JsonProviderImpl provider
-
bufferProvider
private BufferStrategy.BufferProvider<char[]> bufferProvider
-
-
Constructor Detail
-
JsonObjectBuilderImpl
protected JsonObjectBuilderImpl()
-
JsonObjectBuilderImpl
public JsonObjectBuilderImpl(jakarta.json.JsonObject initialData, BufferStrategy.BufferProvider<char[]> bufferProvider, RejectDuplicateKeysMode rejectDuplicateKeysMode, JsonProviderImpl provider)
-
JsonObjectBuilderImpl
public JsonObjectBuilderImpl(Map<String,Object> initialValues, BufferStrategy.BufferProvider<char[]> bufferProvider, RejectDuplicateKeysMode rejectDuplicateKeysMode, JsonProviderImpl provider)
-
-
Method Detail
-
add
public void add(String name, Object value)
Internal method to add a value where we do not yet know the type at compile time.
-
add
public jakarta.json.JsonObjectBuilder add(String name, jakarta.json.JsonValue value)
- Specified by:
add
in interfacejakarta.json.JsonObjectBuilder
-
add
public jakarta.json.JsonObjectBuilder add(String name, String value)
- Specified by:
add
in interfacejakarta.json.JsonObjectBuilder
-
add
public jakarta.json.JsonObjectBuilder add(String name, BigInteger value)
- Specified by:
add
in interfacejakarta.json.JsonObjectBuilder
-
add
public jakarta.json.JsonObjectBuilder add(String name, BigDecimal value)
- Specified by:
add
in interfacejakarta.json.JsonObjectBuilder
-
add
public jakarta.json.JsonObjectBuilder add(String name, int value)
- Specified by:
add
in interfacejakarta.json.JsonObjectBuilder
-
add
public jakarta.json.JsonObjectBuilder add(String name, long value)
- Specified by:
add
in interfacejakarta.json.JsonObjectBuilder
-
add
public jakarta.json.JsonObjectBuilder add(String name, double value)
- Specified by:
add
in interfacejakarta.json.JsonObjectBuilder
-
add
public jakarta.json.JsonObjectBuilder add(String name, boolean value)
- Specified by:
add
in interfacejakarta.json.JsonObjectBuilder
-
addNull
public jakarta.json.JsonObjectBuilder addNull(String name)
- Specified by:
addNull
in interfacejakarta.json.JsonObjectBuilder
-
add
public jakarta.json.JsonObjectBuilder add(String name, jakarta.json.JsonObjectBuilder builder)
- Specified by:
add
in interfacejakarta.json.JsonObjectBuilder
-
add
public jakarta.json.JsonObjectBuilder add(String name, jakarta.json.JsonArrayBuilder builder)
- Specified by:
add
in interfacejakarta.json.JsonObjectBuilder
-
addAll
public jakarta.json.JsonObjectBuilder addAll(jakarta.json.JsonObjectBuilder builder)
- Specified by:
addAll
in interfacejakarta.json.JsonObjectBuilder
-
remove
public jakarta.json.JsonObjectBuilder remove(String name)
- Specified by:
remove
in interfacejakarta.json.JsonObjectBuilder
-
putValue
private void putValue(String name, jakarta.json.JsonValue value)
-
build
public jakarta.json.JsonObject build()
- Specified by:
build
in interfacejakarta.json.JsonObjectBuilder
-
-