I am developing a REST service using Spring Boot and Jackson. For this service the caller can specify the list of fields they want in the result. Suppose we had this java class for which we return the fields to the user:

```
public class Customer {

    public int id;
    public String firstName;
    public String lastName;
    public String addressLine1;
    public String addressLine2;
    public String city;
    public String state;
    public String zip;
    public String phone;

}

```

The client would call our service:

<https://myhost.net/getCustomer?id=2112&lof=id,firstName,lastName>

Where the **lof** parameter is the "list of fields" that the client wants.

This is obviously a simple example, we are implementing something much larger and many more fields are being returned. In addition we are returning many occurrences of objects in 1 call. The requirement is that the client can limit the fields to only the fields they are interested in.

Annotations are out of the question for obvious reasons.

How can I control how the objects are serialized on a per request basis?

Thanks much!
Paul