大家好,我是 Isar Flutter 的新手。我想知道有什么方法可以将现有的 JSON 文件导入到 Isar 中吗?
我尝试在互联网上搜索此内容,但找不到太多内容。
下面是我的 Json 文件的结构。
{
"food": [
{
"id": "0001",
"name": "Cake",
"description": [
{
"type": "Chocolate",
"quantity": 1
},
{
"type": "fruits",
"quantity": 3
},
{
"type": "Corn",
"quantity": 6
}
]
},
{
"id": "0002",
"name": "Raised",
"description": [
{
"type": "Grape",
"quantity": 6
},
{
"type": "Wheat",
"quantity": 2
}
]
}
],
"instruction": [
{
"category": "instruction_1002",
"content": "abc1234"
},
{
"category": "instruction_1003",
"content": "def56789"
}
]
}
Run Code Online (Sandbox Code Playgroud)