Example usage for Java com.google.gson JsonPrimitive fields, constructors, methods, implement or subclass
The text is from its open source code.
JsonPrimitive(Boolean bool) Create a primitive containing a boolean value. | |
JsonPrimitive(Number number) Create a primitive containing a Number . | |
JsonPrimitive(String string) Create a primitive containing a String value. | |
JsonPrimitive(Character c) Create a primitive containing a character. |
JsonPrimitive | deepCopy() Returns the same value as primitives are immutable. |
boolean | equals(Object obj) |
BigDecimal | getAsBigDecimal() convenience method to get this element as a BigDecimal . |
BigInteger | getAsBigInteger() convenience method to get this element as a BigInteger . |
boolean | getAsBoolean() convenience method to get this element as a boolean value. |
byte | getAsByte() |
char | getAsCharacter() |
double | getAsDouble() convenience method to get this element as a primitive double. |
float | getAsFloat() convenience method to get this element as a float. |
int | getAsInt() convenience method to get this element as a primitive integer. |
JsonArray | getAsJsonArray() convenience method to get this element as a JsonArray . |
long | getAsLong() convenience method to get this element as a primitive long. |
Number | getAsNumber() convenience method to get this element as a Number. |
short | getAsShort() convenience method to get this element as a primitive short. |
String | getAsString() convenience method to get this element as a String. |
boolean | isBoolean() Check whether this primitive contains a boolean value. |
boolean | isJsonArray() provides check for verifying if this element is an array or not. |
boolean | isJsonNull() provides check for verifying if this element represents a null value or not. |
boolean | isNumber() Check whether this primitive contains a Number. |
boolean | isString() Check whether this primitive contains a String value. |
String | toString() Returns a String representation of this element. |