accept multiple JSON formats in web service

In my REST web service I need to accept JSON that can have two different structures.

Currently I have:

@Path("/")
public class MyAppResource {
    ...
    @Context private HttpServletRequest request;
    ...
    @POST
    @Produces(MediaType.APPLICATION_JSON)
    public MyResponseItem check(MyRequestItem body) {
        ...
    }
}

where

public class MyRequestItem {
    ...
    @JsonCreator
    public MyRequestItem(@JsonProperty("data") ArrayList<TextItem> data) {
        ...
    }
    ...
}

and

class TextItem {
    ...
    @JsonCreator
    public TextItem(@JsonProperty("count") int count,
                    @JsonProperty("text") String text) {
        ...
    }
    ...
}

So it accepts JSON of the form {"data":[{"count":123,"text":"abc"},...]}.

In addition to the above format I need to accept this format: {"data":["abc,...]}. That is, I think I need to change TextItem so that it can either be a String or a class as above.

How to achieve this?