We are currently developing a REST interface with localized data and are wondering which approach to use to encode localized data.
Possible options:
l10n child
{"id": 1, "l10n": {"en": {"title": "English title"}, "fi": {"title": "Suomalainen otsikko"}}
localized properties
{"id": 1, "title": {"en": "English title", "fi": "Suomalainen otsikko"}}
The first encoding is easier to merge, but the second approach, for example, is compatible with the JSON-LD localization encoding.
source share