Example usage for com.vaadin.server EncodeResult getEncodedValue

List of usage examples for com.vaadin.server EncodeResult getEncodedValue

Introduction

In this page you can find the example usage for com.vaadin.server EncodeResult getEncodedValue.

Prototype

public JsonValue getEncodedValue() 

Source Link

Usage

From source file:de.elomagic.vaadin.addon.networkgraph.NetworkGraph.java

License:Apache License

private Object encodeObject(Object o) {
    try {/*from   w w  w. j av a  2 s  .c o  m*/
        EncodeResult result = JsonCodec.encode(o, null, o.getClass(), null);
        return result.getEncodedValue();
    } catch (JSONException e) {
        throw new RuntimeException(e);
    }
}