org.atmosphere.sockjs
Class JsonCodec

java.lang.Object
  extended by org.atmosphere.sockjs.JsonCodec

public class JsonCodec
extends Object

SockJS requires a special JSON codec - it requires that many other characters, over and above what is required by the JSON spec are escaped. To satisfy this we escape any character that escapable with short escapes and any other non ASCII character we unicode escape it

Author:
Tim Fox

Constructor Summary
JsonCodec()
           
 
Method Summary
static Object decodeValue(String str, Class<?> clazz)
           
static String encode(Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonCodec

public JsonCodec()
Method Detail

encode

public static String encode(Object obj)

decodeValue

public static Object decodeValue(String str,
                                 Class<?> clazz)


Copyright © 2013. All Rights Reserved.