Package org.auto.json

Examples of org.auto.json.JsonObject


* @author XiaohangHu
*/
public class JsonProtocolUtils {

  public static String getCloseCommend() {
    JsonObject commend = new JsonObject();
    commend.put(Protocol.SYNCHRONIZE_KEY, Protocol.DISCONNECT_VALUE);
    return commend.toString();
  }
View Full Code Here


    commend.put(Protocol.SYNCHRONIZE_KEY, Protocol.DISCONNECT_VALUE);
    return commend.toString();
  }

  public static String getConnectionCommend(Serializable socketId) {
    JsonObject commend = new JsonObject();
    commend.put(Protocol.CONNECTIONID_KEY, socketId);
    return commend.toString();
  }
View Full Code Here

    array.add(4);
    array.add("this is a String");
    array.add('c');
    array.add(true);
    array.add(null);
    JsonObject jsonObject = new JsonObject();
    jsonObject.put("name", "hehe");
    jsonObject.put("sdf", new JsonObject());
    jsonObject.put("khiyiu", null);
    array.add(jsonObject);
    array.add(new JsonObject());

    String jsonString = jsonSerializer.toJsonString(person);

    JsonDeserializer deserializer = new JsonDeserializer();
    Person dperson = (Person) deserializer.toObject(jsonString,
View Full Code Here

TOP

Related Classes of org.auto.json.JsonObject

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.