You need to cache the request body so it can be read twice, once to see if it's an array, and again to turn it into a POJO.