com.vaadin.terminal.gwt.client.communication
Class JsonEncoder
java.lang.Object
com.vaadin.terminal.gwt.client.communication.JsonEncoder
public class JsonEncoder
- extends Object
Encoder for converting RPC parameters and other values to JSON for transfer
between the client and 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
Method Summary |
static com.google.gwt.json.client.JSONValue |
encode(Object value,
boolean restrictToInternalTypes,
ApplicationConnection connection)
Encode a value to a JSON representation for transport from the client to
the server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VTYPE_CONNECTOR
public static final String VTYPE_CONNECTOR
- See Also:
- Constant Field Values
VTYPE_BOOLEAN
public static final String VTYPE_BOOLEAN
- See Also:
- Constant Field Values
VTYPE_DOUBLE
public static final String VTYPE_DOUBLE
- See Also:
- Constant Field Values
VTYPE_FLOAT
public static final String VTYPE_FLOAT
- See Also:
- Constant Field Values
VTYPE_LONG
public static final String VTYPE_LONG
- See Also:
- Constant Field Values
VTYPE_INTEGER
public static final String VTYPE_INTEGER
- See Also:
- Constant Field Values
VTYPE_STRING
public static final String VTYPE_STRING
- See Also:
- Constant Field Values
VTYPE_ARRAY
public static final String VTYPE_ARRAY
- See Also:
- Constant Field Values
VTYPE_STRINGARRAY
public static final String VTYPE_STRINGARRAY
- See Also:
- Constant Field Values
VTYPE_MAP
public static final String VTYPE_MAP
- See Also:
- Constant Field Values
VTYPE_LIST
public static final String VTYPE_LIST
- See Also:
- Constant Field Values
VTYPE_SET
public static final String VTYPE_SET
- See Also:
- Constant Field Values
VTYPE_NULL
public static final String VTYPE_NULL
- See Also:
- Constant Field Values
JsonEncoder
public JsonEncoder()
encode
public static com.google.gwt.json.client.JSONValue encode(Object value,
boolean restrictToInternalTypes,
ApplicationConnection connection)
- Encode a value to a JSON representation for transport from the client to
the server.
- Parameters:
value
- value to convertconnection
-
- Returns:
- JSON representation of the value
Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.