public class JsonTemplate extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JsonTemplate.Arr |
static class |
JsonTemplate.Obj |
| Constructor and Description |
|---|
JsonTemplate() |
| Modifier and Type | Method and Description |
|---|---|
static String |
arr(Consumer<JsonTemplate.Arr> fun)
Constructs a JSON array `[...]` using the assigned buffer and a building function
|
static String |
arr(int capacity,
Consumer<JsonTemplate.Arr> fun)
Constructs a JSON array `[...]` using new buffer and a building function
|
static String |
arr(StringBuilder buff,
Consumer<JsonTemplate.Arr> fun)
Constructs a JSON array `[...]` using the assigned buffer and a building function
|
static String |
obj(Consumer<JsonTemplate.Obj> fun)
Constructs a JSON object `{...}` using a reusable buffer and a building function
|
static String |
obj(int capacity,
Consumer<JsonTemplate.Obj> fun)
Constructs a JSON object `{...}` using new buffer and a building function
|
static String |
obj(StringBuilder buff,
Consumer<JsonTemplate.Obj> fun)
Constructs a JSON object `{...}` using the assigned buffer and a building function
|
public static String obj(Consumer<JsonTemplate.Obj> fun)
fun - building functionpublic static String obj(int capacity, Consumer<JsonTemplate.Obj> fun)
capacity - capacityfun - building functionpublic static String obj(StringBuilder buff, Consumer<JsonTemplate.Obj> fun)
buff - the assigned bufferfun - building functionpublic static String arr(Consumer<JsonTemplate.Arr> fun)
fun - building functionpublic static String arr(int capacity, Consumer<JsonTemplate.Arr> fun)
capacity - capacityfun - building functionpublic static String arr(StringBuilder buff, Consumer<JsonTemplate.Arr> fun)
buff - the assigned bufferfun - building functionCopyright © 2023. All rights reserved.