What’s the best JSON API architecture for easy usage with Ember Data, mobile SDKs, … and why knowing that each page can have a different number of translations?
The write interface, is currently made using option 2) inline.
Option 1) As Hash
{
pages: [
{
id: 1,
title: {
en: "Title",
fr: "Titre"
...
}
}
]
}
Option 2) Inline
{
pages: [
{
id: 1,
title_en: "Title",
title_fr: "Titre"
...
}
]
}
P.S: I’ve also posted this question on http://stackoverflow.com/questions/25220442/json-api-and-translations-with-ember-data but I’m not sure their’s a uniq / proper answer to this, it might lead to more discussion and best practice recommendations.