Package google.registry.model
Class JsonMapBuilder
java.lang.Object
google.registry.model.JsonMapBuilder
Helper class for
Jsonifiable
classes to generate JSON maps for RPC responses.
The returned map is mutable. Map entries can be null
but list entries can not. If a
list is passed as null
, it'll be substituted with empty list. Lists are not mutable.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns mutable JSON object.put
(String name, Jsonifiable value) putListOfJsonObjects
(String name, Iterable<? extends Jsonifiable> value) <T> JsonMapBuilder
putListOfStrings
(String name, Iterable<T> value) <T> JsonMapBuilder
-
Constructor Details
-
JsonMapBuilder
public JsonMapBuilder()
-
-
Method Details
-
put
-
put
-
put
-
put
-
put
-
putString
-
putListOfStrings
-
putListOfJsonObjects
public JsonMapBuilder putListOfJsonObjects(String name, @Nullable Iterable<? extends Jsonifiable> value) -
build
Returns mutable JSON object. Please dispose of the builder object after calling me.
-