Package com.google.gson

Examples of com.google.gson.JsonElement


          throw new IOException(errorMessage);
        }
       
        InputStream inputStream = connect.getInputStream();
    JsonElement jsonElement = parser.parse(new InputStreamReader(inputStream));
    if(jsonElement == null) {
          logger.error("Cloud API call + [" + url.toString() + "] failed: unable to parse expected JSON response");
         
          throw new IOException("CloudStack API call error : invalid JSON response");
    }
   
    if(logger.isDebugEnabled())
      logger.debug("Cloud API call + [" + url.toString() + "] returned: " + jsonElement.toString());
    return new JsonAccessor(jsonElement);
  }
View Full Code Here


    assert(json != null);
    _json = json;
  }
 
  public BigDecimal getAsBigDecimal(String propPath) {
    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsBigDecimal();
  }
View Full Code Here

    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsBigDecimal();
  }
 
  public BigInteger getAsBigInteger(String propPath) {
    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsBigInteger();
  }
View Full Code Here

    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsBigInteger();
  }
 
  public boolean getAsBoolean(String propPath) {
    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsBoolean();
  }
View Full Code Here

    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsBoolean();
  }
 
  public byte getAsByte(String propPath) {
    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsByte();
  }
View Full Code Here

    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsByte();
  }
 
  public char getAsCharacter(String propPath) {
    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsCharacter();
  }
View Full Code Here

    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsCharacter();
  }
 
  public double getAsDouble(String propPath) {
    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsDouble();
  }
View Full Code Here

    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsDouble();
  }
 
  public float getAsFloat(String propPath) {
    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsFloat();
  }
View Full Code Here

    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsFloat();
  }
 
  public int getAsInt(String propPath) {
    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsInt();
  }
View Full Code Here

    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsInt();
  }
 
  public long  getAsLong(String propPath) {
    JsonElement jsonElement = eval(propPath);
    return jsonElement.getAsLong();
  }
View Full Code Here

TOP

Related Classes of com.google.gson.JsonElement

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.