public static class JsonBuilder.ObjectBuilder extends Object
Modifier and Type | Method and Description |
---|---|
JsonBuilder.ObjectBuilder |
addArray(String fieldName,
JsonBuilder.ArrayBuilder builder)
Adds a nested JSON array to the object.
|
JsonBuilder.ObjectBuilder |
addBoolean(String fieldName,
boolean value)
Adds a boolean value to the object.
|
JsonBuilder.ObjectBuilder |
addBoolean(String fieldName,
Optional<Boolean> maybeValue)
Adds a boolean value to the object, if present.
|
JsonBuilder.ObjectBuilder |
addNull(String fieldName)
Adds a 'null' value to the object.
|
JsonBuilder.ObjectBuilder |
addNumber(String fieldName,
double value)
Adds a numeric value to the object.
|
JsonBuilder.ObjectBuilder |
addNumber(String fieldName,
Optional<Double> maybeValue)
Adds a numeric value to the object, if present.
|
JsonBuilder.ObjectBuilder |
addObject(String fieldName,
JsonBuilder.ObjectBuilder builder)
Adds a nested JSON object to the object.
|
JsonBuilder.ObjectBuilder |
addRaw(String fieldName,
Optional<String> maybeRawValue)
Adds a raw JSON value to the object, if present.
|
JsonBuilder.ObjectBuilder |
addRaw(String fieldName,
String rawValue)
Adds a raw JSON value to the object.
|
JsonBuilder.ObjectBuilder |
addString(String fieldName,
Optional<String> maybeValue)
Adds a string to the object, if present.
|
JsonBuilder.ObjectBuilder |
addString(String fieldName,
String value)
Adds a string to the object.
|
public JsonBuilder.ObjectBuilder addNull(String fieldName)
public JsonBuilder.ObjectBuilder addBoolean(String fieldName, boolean value)
public JsonBuilder.ObjectBuilder addBoolean(String fieldName, Optional<Boolean> maybeValue)
public JsonBuilder.ObjectBuilder addNumber(String fieldName, double value)
public JsonBuilder.ObjectBuilder addNumber(String fieldName, Optional<Double> maybeValue)
public JsonBuilder.ObjectBuilder addString(String fieldName, String value)
public JsonBuilder.ObjectBuilder addString(String fieldName, Optional<String> maybeValue)
public JsonBuilder.ObjectBuilder addObject(String fieldName, JsonBuilder.ObjectBuilder builder)
public JsonBuilder.ObjectBuilder addArray(String fieldName, JsonBuilder.ArrayBuilder builder)
public JsonBuilder.ObjectBuilder addRaw(String fieldName, String rawValue)
public JsonBuilder.ObjectBuilder addRaw(String fieldName, Optional<String> maybeRawValue)