Given a structure like this:
{
\"nameOfObject\": { \"score\": 100 },
\"anotherObject\": { \"score\": 30 }
}
Is it possible to map this
Here's an improved version of @Buzz Moschetti's, it uses Jackson's ObjectMapper.convertValue() to handle parsing the properties
ObjectMapper mapper = new ObjectMapper();
Map data = mapper.readValue(inputstream, Map.class);
Container c = new Container();
for(Map.Entry entry : data.entrySet()) {
String name = entry.getKey();
ScoreKeeper sk = mapper.convertValue(entry.getValue(), ScoreKeeper.class);
sk.name = name;
c.scoreKeepers.put(name, sk);
}