public.javadoc.org.spincast.core.json.JsonObjectFactory.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
JsonObjectFactory (org.spincast:spincast-framework 1.0.0 API)
org.spincast.core.json
Interface JsonObjectFactory
-
public interface JsonObjectFactory
Factory to create JsonObject
and JsonArray
objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type
Method and Description
JsonObject
create()
Creates an empty and mutable JsonObject.
JsonObject
create(JsonObject objectToClone,
boolean mutable)
Creates an JonObject based on the specified JsonObject.
JsonObject
create(Map<String,Object> initialMap,
boolean mutable)
Creates an JonObject based on the specified Map.
JsonArray
createArray()
Creates an empty and mutable JsonArray.
JsonArray
createArray(List<Object> elements,
boolean mutable)
Creates a JsonArray based on the List.
-
-
Method Detail
-
create
JsonObject create()
Creates an empty and mutable JsonObject.
-
create
JsonObject create(Map<String,Object> initialMap,
boolean mutable)
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
- if true
the resulting
object and all its children will be mutable, otherwise
they will all be immutable.
-
create
JsonObject create(JsonObject objectToClone,
boolean mutable)
Creates an JonObject based on the specified JsonObject.
The JsonObject will be cloned and all its key added to
the created JsonObject.
- Parameters:
mutable
- if true
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.
Copyright © 2019. All rights reserved.