Position of "type" atttribute in structured text

I’m trying to deserialized structured text using .NET’s built in JSON serialization.
It supports discriminators and allows us to set the “type” attribute as value for discriminator.
However, the type discriminator must be placed at the start of the JSON object.
For block elements, this is not the case, at least not in the data I get from the GraphQL endpoint.
As far as I know we can’t control it from the query. Altering the JSON before parsing would be bad for performance.
Can it be changed in DatoCMS ?


                {
                  "type": "paragraph",
                  "children": [
                    {
                      "type": "span",
                      "value": "is "
                    },
                    {
                      "type": "span",
                      "marks": [
                        "strong"
                      ],
                      "value": "nice"
                    }
                  ]
                },
                {
                  "item": "68089749",
                  "type": "block"  🚩
                },
                {
                  "type": "paragraph",
                  "children": [
                    {
                      "type": "span",
                      "value": "there was a block above this text"
                    }
                  ]
                }

Hello @david.desloovere

Unfortunately we can’t change the DAST configuration/order on our end, be it from the dashboard or internally, sorry

Ouch. This causes a big performance hit to be honest. Reading full JSON and fixing position requires more CPU and memory.
If there would even be a way to change this in Dato, I hope this thread comes to mind :wink: