1

For an internal project I have to import a list of all employees from an API response into my Java-Backend.

Therefore I have created a POJO-Class which is pretty similar to my JSON-Object, BUT:

The JSON-File looks something like this:

{
"2160":{
 //employee which i can parse
},
"2161":{
//employee which i can parse
},
...

}


So there is an id infront of every object as a key to this object, which i dont know how to parse without accessing every id ( i have 4000 employees ) solely.

A Solution would be to just delete the "2161:" id from every entry, but then i would have to do this 4k times, which I dont think is a good idea ;)

Any suggestion on how to solve this problem?

sav
  • 43
  • 1
  • 7
  • 1
    This is basically a Map. Parse your JSON as that. – JB Nizet Aug 30 '19 at 13:23
  • I can't help you (nobody can) if you don't tell which parser you're using, if you don't post the code and if you don't post the exact and complete error message. – JB Nizet Sep 02 '19 at 06:30

0 Answers0