Java com.google.gson JsonObject fields, constructors, methods, implement or subclass

Example usage for Java com.google.gson JsonObject fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.gson JsonObject.

The text is from its open source code.

Implementation

com.google.gson.JsonObject has the following implementations.
Click this link to see all its implementation.

Constructor

Method

voidadd(String property, JsonElement value)
Adds a member, which is a name-value pair, to self.
voidaddProperty(String property, String value)
Convenience method to add a primitive member.
voidaddProperty(String property, Number value)
Convenience method to add a primitive member.
voidaddProperty(String property, Boolean value)
Convenience method to add a boolean member.
voidaddProperty(String property, Character value)
Convenience method to add a char member.
JsonObjectdeepCopy()
Creates a deep copy of this element and all its children
Set>entrySet()
Returns a set of members of this object.
booleanequals(Object o)
JsonElementget(String memberName)
Returns the member with the specified name.
booleangetAsBoolean()
convenience method to get this element as a boolean value.
intgetAsInt()
convenience method to get this element as a primitive integer value.
JsonArraygetAsJsonArray(String memberName)
Convenience method to get the specified member as a JsonArray.
JsonArraygetAsJsonArray()
convenience method to get this element as a JsonArray .
JsonObjectgetAsJsonObject(String memberName)
Convenience method to get the specified member as a JsonObject.
JsonObjectgetAsJsonObject()
convenience method to get this element as a JsonObject .
JsonPrimitivegetAsJsonPrimitive(String memberName)
Convenience method to get the specified member as a JsonPrimitive element.
NumbergetAsNumber()
convenience method to get this element as a Number .
StringgetAsString()
convenience method to get this element as a string value.
booleanhas(String memberName)
Convenience method to check if a member with the specified name is present in this object.
inthashCode()
booleanisJsonNull()
provides check for verifying if this element represents a null value or not.
booleanisJsonObject()
provides check for verifying if this element is a Json object or not.
booleanisJsonPrimitive()
provides check for verifying if this element is a primitive or not.
SetkeySet()
Returns a set of members key values.
JsonElementremove(String property)
Removes the property from this JsonObject .
intsize()
Returns the number of key/value pairs in the object.
StringtoString()
Returns a String representation of this element.