Package com.vaadin.client.communication
Class JsonDecoder
- java.lang.Object
-
- com.vaadin.client.communication.JsonDecoder
-
public class JsonDecoder extends Object
Client side decoder for decodeing shared state and other values from JSON received from the server. Currently, basic data types as well as Map, String[] and Object[] are supported, where maps and Object[] can contain other supported data types. TODO extensible type support- Since:
- 7.0
-
-
Constructor Summary
Constructors Constructor Description JsonDecoder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
decodeValue(Type type, JsonValue jsonValue, Object target, ApplicationConnection connection)
Decode a JSON array with two elements (type and value) into a client-side type, recursively if necessary.static <T extends JsonValue>
Tobj2jso(Object object)
Called by generated deserialization code to treat a generic object as a JsonValue.
-
-
-
Method Detail
-
decodeValue
public static Object decodeValue(Type type, JsonValue jsonValue, Object target, ApplicationConnection connection)
Decode a JSON array with two elements (type and value) into a client-side type, recursively if necessary.- Parameters:
jsonValue
- JSON value with encoded dataconnection
- reference to the current ApplicationConnection- Returns:
- decoded value (does not contain JSON types)
-
-