toJsonArray
Returns a Collector that accumulates JsonElements into a new JsonArray.
Example usage:
JsonArray jsonArray = elements.stream()
.map(JsonObject::new)
.collect(toJsonArray());
Content copied to clipboard
Return
a collector that gathers elements into a JsonArray
Since
3.7.0