com.vaadin.client.communication
Class JsonDecoder

java.lang.Object
  extended by com.vaadin.client.communication.JsonDecoder

public class JsonDecoder
extends java.lang.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
JsonDecoder()
           
 
Method Summary
static java.lang.Object decodeValue(Type type, JSONValue jsonValue, java.lang.Object target, ApplicationConnection connection)
          Decode a JSON array with two elements (type and value) into a client-side type, recursively if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonDecoder

public JsonDecoder()
Method Detail

decodeValue

public static java.lang.Object decodeValue(Type type,
                                           JSONValue jsonValue,
                                           java.lang.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 data
connection - reference to the current ApplicationConnection
Returns:
decoded value (does not contain JSON types)


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.