Package net.sf.json

Examples of net.sf.json.JSONObject.optInt()


    JSONObject json = JSONObject.fromString(msg);
    logMessage = new LogMessage();
    logMessage.setLocation(json.optString("location"));
    logMessage.setMessageBody(json.optString("messageBody"));
    logMessage.setTimestamp(json.optString("timestamp"));
    logMessage.setLogLevel(json.optInt("logLevel"));

    Object object = json.opt("messageObject");
    //System.out.println("message object type = " + json.opt("messageObject").getClass());
    //System.out.println("message object = " + json.opt("messageObject"));
    if (object instanceof JSONNull)
View Full Code Here


    this.attDescription = attDescription;
  }
 
  public int getOrientationLevel(){
    JSONObject serverWorkObj = getJson();
    int orientationLevel = serverWorkObj.optInt(UploadConstants.SERVER_ORIENTATION_KEY, 0);
    return orientationLevel;
  }
 
  public void setOrientationLevel(int level){
    JSONObject serverWorkObj = getJson();
View Full Code Here

    attDescription.setSavingRequired(true);
  }
 
  public int getThumbnailLevel(){
    JSONObject serverWorkObj = getJson();
    int thumbnailLevel = serverWorkObj.optInt(UploadConstants.SERVER_THUMBNAIL_KEY, 0);
    return thumbnailLevel;
  }
 
  public void setThumbnailLevel(int level){
    JSONObject serverWorkObj = getJson();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.