I have class User:

```
public class User {
    private Integer id;
    private String name;
    .....
}

```

And have controller method:

```
@RequestMapping ...
@ResponseBody public List<User> loadAll(...) {
    List<User> users = ...;
    return users;
}

```

Now json looks like:

```
[{"id":1,"name":"Michael"},{"id":2,"name":"Peter"},...]

```

and all works fine, but I wan to add pagination. How json should look like:

```
["users":[{"id":1,"name":"Michael"},{"id":2,"name":"Peter"},...],"totalCount":500 ]

```

And I am trying to find best practice to do this modifications.

**Spring version: 3.1.2.RELEASE**

Thanks

PS.I am new to Jackson. I used net.sf.json but do not want to fully generate response.