How to retrieve all the key nodes and values inside a model class?
So try to change all values to String, and the code may remain unchanged or, change all values to be numbers and the use:
long value = ds.getValue(Long.class);
In case of keys, there is nothing you should do, as all keys are strings.