Skip to content
Advertisement

RestTemplate get list from specific json structure

The json is of this structure:

JavaScript

I have a DTO of the form

JavaScript

I want to parse the array into List and ignore data. This is the code:

JavaScript

But I get this exception

JavaScript

Advertisement

Answer

I would suggest you changing your model as follows:

JavaScript

And your test also:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement