Spring data model question


#1

I am trying to retrieve a simple json document from a bucket of the format given below
Since this is a very generic type json with the users having the ability to add categories and key values dynamically I would like to know how to model this in spring data. Is it possible to do something like this in a model class and have it populated?

private Map<String, List> data; where KeyValue is a class of String key and value.

I dont believe this is possible through the spring data repository apis. Should I just be reading the raw json document , if yes how do I do it using the api?

{
“category1”: {
“key1”: “value1”,
“key2”: “value2”
},
category2": {
“key1”: “value1”,
“key2”: “value2”
}
}