public class GsonObject extends java.lang.Object implements JSONify.JObject
JSONify.JObject
using Gson
Constructor and Description |
---|
GsonObject()
Creates an empty instance
|
GsonObject(java.lang.String json)
Creates an instance from given json
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getJsonValue(java.lang.String parameter)
Returns the value of parameter in json in this element if any
|
java.util.Set<java.lang.String> |
getKeys()
Returns the list of parameters in this element
|
void |
put(java.lang.String name,
int value)
Adds a name value parameter
|
void |
put(java.lang.String name,
JSONify.JElement value)
Adds a name value parameter
|
void |
put(java.lang.String name,
java.lang.String value)
Adds a name value parameter
|
void |
putJson(java.lang.String name,
java.lang.String value)
Adds the given json string as value of given parameter
|
java.lang.String |
toJson()
Returns the JSON representation
|
java.lang.String |
toString() |
public GsonObject()
public GsonObject(java.lang.String json)
public java.lang.String toJson()
JSONify.JElement
toJson
in interface JSONify.JElement
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Set<java.lang.String> getKeys()
JSONify.JElement
getKeys
in interface JSONify.JElement
public java.lang.String getJsonValue(java.lang.String parameter)
JSONify.JElement
getJsonValue
in interface JSONify.JElement
public void putJson(java.lang.String name, java.lang.String value)
JSONify.JObject
putJson
in interface JSONify.JObject
public void put(java.lang.String name, java.lang.String value)
JSONify.JObject
put
in interface JSONify.JObject
public void put(java.lang.String name, int value)
JSONify.JObject
put
in interface JSONify.JObject
public void put(java.lang.String name, JSONify.JElement value)
JSONify.JObject
put
in interface JSONify.JObject