To get a bit familiar with the OpenAPI Spec's, I decided to document an already existing API (out of my control) which I wanted to consume anyways. I know that's the wrong way around, but a good way to learn.
However, I came across a tricky thing:
As a response I get an array of objects. But the "feature" is, the objects are defined as key-value-pair's, where the key is the index of the response:
{
"count": "2",
"results": {
"0": {
"text": "hello"
},
"1": {
"text": "hello"
}
}
Is there a way to solve this dynamically, like to interpret it as a dictionary?
To get a bit familiar with the OpenAPI Spec's, I decided to document an already existing API (out of my control) which I wanted to consume anyways. I know that's the wrong way around, but a good way to learn.
However, I came across a tricky thing:
As a response I get an array of objects. But the "feature" is, the objects are defined as key-value-pair's, where the key is the index of the response:
{ "count": "2", "results": { "0": { "text": "hello" }, "1": { "text": "hello" } }Is there a way to solve this dynamically, like to interpret it as a dictionary?