Rest Assured – deserialize Response JSON as List

You can do this:

List<Artwork> returnedArtworks = Arrays.asList(response.getBody().as(Artwork[].class));

The trick is to deserialize JSON to an array of objects (because there is no difference between the JSON string of an array or a list), then convert the array to a list.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)