Package org.structr.websocket

Examples of org.structr.websocket.WebSocketDataGSONAdapter


  public void configure(final WebSocketServletFactory factory) {
   
    // create GSON serializer
    final GsonBuilder gsonBuilder = new GsonBuilder()
      .setPrettyPrinting()
      .registerTypeAdapter(WebSocketMessage.class, new WebSocketDataGSONAdapter(config.getDefaultIdProperty(), config.getOutputNestingDepth()));
   
    final boolean lenient = Boolean.parseBoolean(StructrApp.getConfigurationValue("json.lenient", "false"));
    if (lenient) {
      // Serializes NaN, -Infinity, Infinity, see http://code.google.com/p/google-gson/issues/detail?id=378
      gsonBuilder.serializeSpecialFloatingPointValues();
View Full Code Here

TOP

Related Classes of org.structr.websocket.WebSocketDataGSONAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.