Practical use case for X-Flatten header?

When/where does it make sense to use:

X-Flatten: true
{ 
    ...,
    "data": {
        "name": {
            "de": "Copenhagen",
            "sv": "Köpenhamn"
        },
        "population": 1400000
    }
}

https://docs.squidex.io/concepts/localization#x-flatten-header

Just want to explain again what it does: Whenever you have only one value per field it flattens this field.

This is useful in two scenarios:

  1. When you have a client in javascript or typescript where you typically do not want to write deserialization code.

  2. When you use X-Languages. You can configure fallback languages in Squidex and then define in your request that you want to have German texts only. Then you will get a flat structure with the correct languages only.

Got it. You can close this one now. Thanks!

PS. Experiment in Postman to understand this one better.

If you have suggestions how to improve the docs they are very welcome, especially as a PR :wink: