I'm using API, where the response is represeted by the multi-layer nested JSON.
{
"name": "Example",
"settings": {
"exampleOne": "value",
"exampleTwo": 100,
"exampleThree": {
"subexampleOne": "value",
"subexampleTwo": "value"
},
"arrayProperty": [
{"subexampleOne": "value"},
{"subexampleTwo": "value"}
]
}
}
Settings is supporting simple properties (numbers, strings, etc), complex types with inner properties or arrays of properties. I cannot predict how many levels the JSON will have.
How to model the proper DTO for such JSON's? Shoud I use just string, JObject, or maybe completely different approach?