im new here and have a problem, surprise surprise :D
I have a JSON String and i want to convert it into a List.
My JSON String:
{
"results": [
{
"uri": "http://xxxxxx",
"downloadCount": 0,
"lastDownloaded": "2017-04-10T16:12:47.438+02:00",
"remoteDownloadCount": 0,
"remoteLastDownloaded": "1970-01-01T01:00:00.000+01:00"
},
{
"uri": "http://yyyyyyy",
"downloadCount": 0,
"lastDownloaded": "2017-04-10T16:12:47.560+02:00",
"remoteDownloadCount": 0,
"remoteLastDownloaded": "1970-01-01T01:00:00.000+01:00"
},]}
How can i convert it in Java?
EDIT: My Problem was the "results" Root-Element... this worked fine.
>(){}).withRootName("results"); List artifactList = objectReader.readValue(jsonString);`
– Juli Sep 05 '17 at 14:06