Q:

How can I read JSON data from a URL in Java?

This is my Aman class:
import org.codehaus.jackson.annotate.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown=true)
public class  Aman
{

public static class Title
{
    private String title;

    public String getTitle(){ return title; }

    public String setTitle(String s){ return title = s; }
}

private int id;
private int year;
private int total;

public void id(int i){ id = i; }

public void year(int y){ year = y; }

public void total(int t){ total =t; }
}

This is the Movie class that is mapping the values:
import java.io.File;
import java.io.IOException;
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import java.net.*;

public class Movie
{
 public static void main(String[] args) throws MalformedURLException, URISyntaxException, IOException {
 Aman a = new Aman();
 ObjectMapper mapper = new ObjectMapper();
 URL RT = new URL("http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=gzscv4f8zqse75w94mmp37zz&q=Toy+Story+3&page_limit=1").toURI().toURL();
 a = mapper.readValue(RT, Aman.class);
    }

}

I am getting the same exception over and over again. 
Am I doing something wrong? 
Here is the exception that keeps occuring:

Exception:Exception in thread "main" org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "total" (Class Aman), not marked as ignorable
 at [Source: http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=gzscv4f8zqse75w94mmp37zz&q=Toy+Story+3&page_limit=1; line: 31, column: 11] (through reference chain: Aman["total"])

A:

To the top of your Aman class, add the following annotation - @JsonIgnoreProperties(unknown=true). That, or actually map all the attributes present in the JSON as properties in the class.
@JsonIgnoreProperties(ignoreUnknown=true)
class Aman {
    // properties
}

Some other options for managing non-mapped attributes are described on the Jackson FasterXML Wiki.

Edit:
Based on your comments, the data class you are mapping the JSON too has no properties whatsoever. This is not going to work. I would recommend reading through the 5 Minute Jackson Tutorial on FasterXML, but the general gist of mapping is this:
Given JSON document:
{
    "message" : "Hi, I am a JSON object",
    "sender" : "Bob"
}

And Java object:
@JsonIgnoreProperties(unknown=true)
class Post {
    private String message;
}

You can write the following code to map the JSON to the object, using Jackson:
final ObjectMapper mapper = new ObjectMapper();
final Post post = mapper.readValue(json, Post.class);

Assume that json is a string containing the JSON data shown
Jackson will map the attributes in the JSON to the properties in the Java object. In the example shown, there is an additional attribute in the JSON called sender. Ordinarily the library would throw an exception if there was not a corresponding property with the same name on your Java object, but with the @JsonIgnoreProperties(unknown=true) annotation this behavior is overriden, and instead the deserialization continues.
So what you have to do is define an Aman class that has properties matching the JSON that the Rotten Tomatoes API is sending you.

