Skip to content

Commit

Permalink
extended data builder with boolean values
Browse files Browse the repository at this point in the history
issue imixs#196
  • Loading branch information
rsoika committed Mar 3, 2023
1 parent f2cedb5 commit 264b881
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ public DataBuilder addData(final String name, final String value) {
return this;
}

public DataBuilder addData(final String name, final boolean value) {
if (arrayBuilder != null) {
if (arrayObjectBuilder == null) {
arrayObjectBuilder = Json.createObjectBuilder();
}
arrayObjectBuilder.add(name, value);
} else {
rootBuilder.add(name, value);
}
return this;
}

public DataBuilder addDataList(final String name, final List<String> values) {
if (arrayBuilder != null) {
if (arrayObjectBuilder == null) {
Expand Down

0 comments on commit 264b881

Please sign in to comment.