Package org.spincast.core.json
Interface JsonObjectFactory
public interface JsonObjectFactory
Factory to create
JsonObject
and JsonArray
objects.-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Creates an empty and mutable JsonObject.Creates an JonObject based on the specified Map.create
(JsonObject objectToClone, boolean mutable) Creates an JonObject based on the specified JsonObject.Creates an empty and mutable JsonArray.createArray
(List<Object> elements, boolean mutable) Creates a JsonArray based on the List.
-
Method Details
-
create
JsonObject create()Creates an empty and mutable JsonObject. -
create
Creates an JonObject based on the specified Map.The keys will be parsed as
JsonPaths
.Any none native objects will be cloned to a
JsonObject
.- Parameters:
mutable
- iftrue
the resulting object and all its children will be mutable, otherwise they will all be immutable.
-
create
Creates an JonObject based on the specified JsonObject.The JsonObject will be cloned and all its key added to the created JsonObject.
- Parameters:
mutable
- iftrue
the resulting object and all its children will be mutable, otherwise they will all be immutable.
-
createArray
JsonArray createArray()Creates an empty and mutable JsonArray. -
createArray
Creates a JsonArray based on the List.Any none native objects will be cloned to a
JsonObject
.- Parameters:
mutable
- iftrue
the resulting array and all its children will be mutable, otherwise they will all be immutable.
-