title: How to get more tweets by using twitter4j and parse to json?
body: <p>I am using twitter4j to retrieve tweets from Twitter. As we know, we can only retrieve tweets less than 7 days. Also we can only get 100 real time tweets. But I want to retrieve more than that. After searching, I found that we can use <code>setSince</code> and <code>setUntil</code> to get <strong>more than 100 tweets</strong>. But when I used <code>setSince</code> and <code>setUntil</code>, I still can only get real-time tweets. Besides, I want to know how to parse my tweets to <strong>json format</strong>?<br>
  Here's my code:</p>
  
  <pre><code>public static void main(String[] args) throws TwitterException, IOException, ClassNotFoundException, IllegalAccessException, InstantiationException, SQLException 
      {
  
          ConfigurationBuilder cb = new ConfigurationBuilder();
          cb.setDebugEnabled(true)
                  .setOAuthConsumerKey("XXX")
                  .setOAuthConsumerSecret("XXX")
                  .setOAuthAccessToken("XXX")
                  .setOAuthAccessTokenSecret("XX");
          TwitterFactory tf = new TwitterFactory(cb.build());
          Twitter twitter = tf.getInstance();
          Query query = new Query("KEYWORD");
          query.setCount(100);
          query.setSince("2013-06-27");
          query.setUntil("2013-07-02");
          query.geoCode(new GeoLocation(XXX, XXX), 200, Query.KILOMETERS);
          QueryResult result = twitter.search(query);
          System.out.println(result);
  }
  </code></pre>