Code example for JsonParser

Methods: parse

  public static Status fromJson(String json) {
    JsonObject obj = (JsonObject) parser.parse(json);
    Status status = new Status();
    status.text = obj.get("text").getAsString(); = obj.get("id").getAsLong();
    status.screenname = obj.get("user").getAsJsonObject().get("screen_name").getAsString();
    status.createdAt = obj.get("created_at").getAsString();
    // TODO: We need to parse out the other fields. 
    status.jsonObject = obj;
    status.jsonString = json;
    return status;
Connect your IDE to all the code out there  Get Codota for Java