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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract voidappendTo(Appendable appendable) (package private) abstract Stringbuild()(package private) abstract booleanisEmpty()protected booleanprotected booleanisValuesEmpty(Collection<Object> values) protected abstract Tself()
-
Field Details
-
ignoreEmptyBuilders
protected boolean ignoreEmptyBuilders
-
-
Constructor Details
-
JsonBuilder
JsonBuilder(boolean ignoreEmptyBuilders) - 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
-