|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.jpa.client.local.JsonUtil
public class JsonUtil
JSON-related operations required by Errai JPA.
Constructor Summary | |
---|---|
JsonUtil()
|
Method Summary | ||
---|---|---|
static
|
basicValueFromJson(com.google.gwt.json.client.JSONValue jsonValue,
Class<Y> expectedType)
Converts the given JSONValue to the Java value of the given type. |
|
static com.google.gwt.json.client.JSONValue |
basicValueToJson(Object value)
Returns a JSONValue that represents the given value, which must be one of the JPA2 basic types. |
|
static boolean |
equals(com.google.gwt.json.client.JSONValue v1,
com.google.gwt.json.client.JSONValue v2)
Compares two JSON values for equality by value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JsonUtil()
Method Detail |
---|
public static com.google.gwt.json.client.JSONValue basicValueToJson(Object value)
value
- The value to convert to JSON. Must be a JPA2 basic type. Null is
permitted.
value
. Never null (but might be
an instance of JSONNull).public static <Y> Y basicValueFromJson(com.google.gwt.json.client.JSONValue jsonValue, Class<Y> expectedType)
basicValueToJson(Object)
.
jsonValue
- The value to convert from JSON. Not null.expectedType
- The Java type to convert to. Not null.
value
. Will be null if the given
JSONValue is a JSONNull.public static boolean equals(com.google.gwt.json.client.JSONValue v1, com.google.gwt.json.client.JSONValue v2)
If the actual type of v1 and v2 differs, the values are considered unequal (that is, type coercion is never performed when doing a comparison).
This method returns true under the following conditions:
v1
- One of the values to compare. Must not be null (but JSONNull is
permitted).v2
- The other value to compare. Must not be null (but JSONNull is
permitted).
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |