Contentful は非常に便利なサービスですが、残念ながら json 応答形式では、標準の拡張 json データ形式を使用できません。
一般的なjson構造のネストを返すには、追加のトランスレーターを作成する必要があります。
たとえば、Contentful を使用すると (簡易版)
{
"module" : {
"lessons" : [
"id": "<lesson_id>"
]
}
"includes": {
"Entry": [
{
id: "<lesson_id>",
lesson : {
"lesson data" : "lesson data",
topics : [
"id" : "<topic_id>"
]
}
},
id: "<topic_id>",
topic : {
"topic data" : "topic data",
]
}
}
]
}
しかし、私たちはこれが欲しい
{
"module" : {
"lessons" : [
{
"lessonData" : "lesson data",
"topics" : [
{
"topicData" : "topic data",
}
]
}
],
}
}
Contentful レスポンスを標準の json レスポンスに組み立てるための一般化されたツールを持っている人はいますか?