Package com.persiste.sdk.json

Examples of com.persiste.sdk.json.JSONObject


      token = new Yytoken(Yytoken.TYPE_EOF, null);
  }
 
  private Map createObjectContainer(ContainerFactory containerFactory){
    if(containerFactory == null)
      return new JSONObject();
    Map m = containerFactory.createObjectContainer();
   
    if(m == null)
      return new JSONObject();
    return m;
  }
View Full Code Here


public class Put extends CallableMethod{
  private JSONObject log;
 
  @SuppressWarnings("unchecked")
  public Put(Log log) {
    this.log=new JSONObject();
    this.log.put("level", new Integer(log.level));
    this.log.put("title", log.title);
    this.log.put("description", log.description);
    this.log.put("emiter", log.emiter);
    this.log.put("custom_fields", log.custom_fields);
View Full Code Here

      formated_response=new LogserviceResponse("failure","Authentication error, check your credentials");
      return formated_response;
    }
   
    try{
      JSONObject json=(JSONObject)JSONValue.parse(response);
      formated_response=new LogserviceResponse((String)json.get("status"),(String)json.get("message"));
      ArrayList<JSONObject> logs=(ArrayList<JSONObject>)json.get("data");
      if(logs!=null){
        ArrayList<Object> data=new ArrayList<Object>();
        Log log=null;
        for(JSONObject obj:logs){
          log=new Log(Integer.parseInt((String)obj.get("level")),(String)obj.get("title"),(String) obj.get("description"), (String )obj.get("emiter_email"), (Map<String, String>) obj.get("custom_fields") , (String) obj.get("stack_trace"));
View Full Code Here

TOP

Related Classes of com.persiste.sdk.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.