我目前有一个大型 JSON 文件,它必须存储在后端(mongodb & Go)中并在前端使用。我想知道文档的第三个字段是否应该类似于“子类别”而不是第二个字段中的运动名称,或者这是否可能,因为我认为这可能由于不一致而难以在后端语言中建模和反序列化?
样本:
{
"_id" : ObjectId("55c"),
"Sport" : "Athletics ",
"Athletics" : {
["Men's Individual", "Women's Individual", "Mixed Relay"]
}
}
{
"_id" : ObjectId("56c"),
"Sport" : "Tennis",
"Tennis" : ["Men's singles", "Women's singles", "Men's doubles", "Women's doubles", "Mixed doubles"]
}
{
"_id" : ObjectId("57c"),
"Sport" : "Swimming",
"Swimming" : {
"Men" : ["4×100 m relay", "4×200 m freestyle relay"],
"Women" : ["4×100 m relay", "4×200 m freestyle relay"]
}
}
动漫人物
犯罪嫌疑人X
相关分类