Commit 2776bb37 authored by MARIO LLESTA MUÑOZ's avatar MARIO LLESTA MUÑOZ
Browse files

parent 88028407
package packageTwitter;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
* Tweet is the class which will store Tweets
public class Tweet {
public static Tweet deserializeJson(String input_json) {
Gson gson = new Gson();
Tweet new_Tweet = gson.fromJson(input_json, Tweet.class);
return new_Tweet;
public static List<Tweet> deserializeJsonArray(String input_json) {
Gson gson = new Gson();
Type collectionType = new TypeToken<Collection<Tweet>>() {}.getType();
Collection<Tweet> new_tweet_collection = gson.fromJson(input_json,
ArrayList<Tweet> new_Tweet_list = new ArrayList<Tweet>(
return new_Tweet_list;
public String geo;
public String in_reply_to_status_id;
public String truncated;
public String created_at;
public String retweet_count;
public String in_reply_to_user_id;
public String id_str;
public transient String place;
public boolean favorited;
public String source;
public String in_reply_to_screen_name;
public String in_reply_to_status_id_str;
public long id;
public String contributors;
public String coordinates;
public boolean retweeted;
public String text;
public String profile_image_url;
public User user;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment