Package io.quarkus.builder
Class Json.JsonBuilder<T>
java.lang.Object
io.quarkus.builder.Json.JsonBuilder<T>
- Direct Known Subclasses:
Json.JsonArrayBuilder,Json.JsonObjectBuilder
- Enclosing class:
Json
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final booleanSkips escaping characters in string values.protected JsonTransform -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract void(package private) abstract voidappendTo(Appendable appendable) (package private) abstract Stringbuild()(package private) abstract booleanisEmpty()protected booleanprotected booleanisValuesEmpty(Collection<Object> values) protected abstract Tself()(package private) voidsetTransform(JsonTransform transform) voidtransform(JsonMultiValue value, JsonTransform transform)
-
Field Details
-
ignoreEmptyBuilders
protected final boolean ignoreEmptyBuilders -
skipEscapeCharacters
protected final boolean skipEscapeCharactersSkips escaping characters in string values. This option should be enabled when transforming JSON input, whose string values are already escaped. In situations like this, the option avoids escaping characters that are already escaped. -
transform
-
-
Constructor Details
-
JsonBuilder
JsonBuilder(boolean ignoreEmptyBuilders, boolean skipEscapeCharacters) - Parameters:
ignoreEmptyBuilders- If set to true all empty builders added to this builder will be ignored duringbuild()
-
-
Method Details
-
isEmpty
abstract boolean isEmpty()- Returns:
trueif there are no elements/properties,falseotherwise
-
build
- Returns:
- a string representation
- Throws:
IOException
-
appendTo
- Throws:
IOException
-
isIgnored
- Parameters:
value-- Returns:
trueif the value is null or an empty builder andignoreEmptyBuildersis set totrue,falseotherwise
-
isValuesEmpty
-
self
-
add
-
setTransform
-
transform
-