Is there a way to map dynamic keys in a JSON document to a model class and eventually read and write this document to a Couchbase bucket using Spring Data?
One approach would be to encapsulate all dynamic fields within a key, e.g., “data”, in the document. However, are there other options or best practices for managing such dynamic structures in Couchbase with Spring Data? Any guidance would be highly appreciated.
{
"myDynamicKey1": [
1,
2,
3
],
"myDynamicKey2": true,
"myDynamicKey3": null,
"myDynamicKey4": 123,
"myDynamicKey5": {
"a": "b",
"c": "d",
"e": "f"
},
"myDynamicKey6": "Hello World"
}