class JacksonJsonObjectReader<T> implements JsonObjectReader<T> {

	private final Class<? extends T> itemType;

	private JsonParser jsonParser;

	private ObjectMapper mapper;

	private InputStream inputStream;

	/**
	 * Create a new {@link JacksonJsonObjectReader} instance.
	 * @param itemType the target item type
	 */
	public JacksonJsonObjectReader(Class<? extends T> itemType) {
		this(new ObjectMapper(), itemType);
	}

	public JacksonJsonObjectReader(ObjectMapper mapper, Class<? extends T> itemType) {
		this.mapper = mapper;
		this.itemType = itemType;
	}

	/**
	 * Set the object mapper to use to map Json objects to domain objects.
	 * @param mapper the object mapper to use
	 * @see #JacksonJsonObjectReader(ObjectMapper, Class)
	 */
	public void setMapper(ObjectMapper mapper) {
		Assert.notNull(mapper, "The mapper must not be null");
		this.mapper = mapper;
	}

	@Override
	public void open(Resource resource) throws Exception {<FILL_FUNCTION_BODY>}

	@Nullable
	@Override
	public T read() throws Exception {
		try {
			if (this.jsonParser.nextToken() == JsonToken.START_OBJECT) {
				return this.mapper.readValue(this.jsonParser, this.itemType);
			}
		}
		catch (IOException e) {
			throw new ParseException("Unable to read next JSON object", e);
		}
		return null;
	}

	@Override
	public void close() throws Exception {
		this.inputStream.close();
		this.jsonParser.close();
	}

	@Override
	public void jumpToItem(int itemIndex) throws Exception {
		for (int i = 0; i < itemIndex; i++) {
			if (this.jsonParser.nextToken() == JsonToken.START_OBJECT) {
				this.jsonParser.skipChildren();
			}
		}
	}

}

		Assert.notNull(resource, "The resource must not be null");
		this.inputStream = resource.getInputStream();
		this.jsonParser = this.mapper.getFactory().createParser(this.inputStream);
		Assert.state(this.jsonParser.nextToken() == JsonToken.START_ARRAY,
				"The Json input stream must start with an array of Json objects");
	
<no_super_class>