Package net.jangaroo.jooc.json
Class JsonObject
- java.lang.Object
-
- net.jangaroo.jooc.json.JsonObject
-
-
Field Summary
Fields Modifier and Type Field Description static StringNET_JANGAROO_EXT_CREATE
-
Constructor Summary
Constructors Constructor Description JsonObject(Object... namesAndValues)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(JsonObject jsonObject)static voidapply(JsonObject o1, JsonObject o2)static Codecode(String code)Objectget(String property)StringgetWrapperClass()booleanisEmpty()static booleanisIdentifier(String str)static JsonObjectmerge(JsonObject... toMerge)Objectremove(String property)voidset(String property, Object value)voidsettingConfigClass(String fullName)JsonObjectsettingWrapperClass(String wrapperClass)Stringstringify()Stringstringify(int indentFactor)StringtoString()StringtoString(int indentFactor)Make a pretty-printed JSON text of this JSONObject.StringtoString(int indentFactor, int indent)Make a prettyprinted JSON text of this JSONObject.StringtoString(int indentFactor, int indent, boolean alwaysQuoteKeys)static StringvalueToString(Object value, int indentFactor, int indent)Make a prettyprinted JSON text of an object value.static StringvalueToString(Object value, int indentFactor, int indent, boolean alwaysQuoteKeys)
-
-
-
Field Detail
-
NET_JANGAROO_EXT_CREATE
public static final String NET_JANGAROO_EXT_CREATE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JsonObject
public JsonObject(Object... namesAndValues)
-
-
Method Detail
-
apply
public static void apply(JsonObject o1, JsonObject o2)
-
merge
public static JsonObject merge(JsonObject... toMerge)
-
getWrapperClass
public String getWrapperClass()
-
settingWrapperClass
public JsonObject settingWrapperClass(String wrapperClass)
-
isEmpty
public boolean isEmpty()
-
toString
public String toString(int indentFactor)
Make a pretty-printed JSON text of this JSONObject.Warning: This method assumes that the data structure is acyclic.
- Parameters:
indentFactor- The number of spaces to add to each level of indentation.- Returns:
- a printable, displayable, portable, transmittable
representation of the object, beginning
with
{(left brace) and ending with}(right brace).
-
valueToString
public static String valueToString(Object value, int indentFactor, int indent)
Make a prettyprinted JSON text of an object value.Warning: This method assumes that the data structure is acyclic.
- Parameters:
value- The value to be serialized.indentFactor- The number of spaces to add to each level of indentation.indent- The indentation of the top level.- Returns:
- a printable, displayable, transmittable
representation of the object, beginning
with
{(left brace) and ending with}(right brace).
-
valueToString
public static String valueToString(Object value, int indentFactor, int indent, boolean alwaysQuoteKeys)
-
toString
public String toString(int indentFactor, int indent)
Make a prettyprinted JSON text of this JSONObject.Warning: This method assumes that the data structure is acyclical.
- Specified by:
toStringin interfaceJson- Parameters:
indentFactor- The number of spaces to add to each level of indentation.indent- The indentation of the top level.- Returns:
- a printable, displayable, transmittable
representation of the object, beginning
with
{(left brace) and ending with}(right brace).
-
stringify
public String stringify()
-
stringify
public String stringify(int indentFactor)
-
toString
public String toString(int indentFactor, int indent, boolean alwaysQuoteKeys)
-
isIdentifier
public static boolean isIdentifier(String str)
-
add
public void add(JsonObject jsonObject)
-
settingConfigClass
public void settingConfigClass(String fullName)
-
-