这个领域很新,英语不是我的母语。提前对不起。
尝试使用开放数据,格式为json。
例如,
http://data.com/openapi/sample/json/1/5?RECIPE_NM=pasta(RECIPE_NM是必要的参数!)
这个json数据有
{
"Grid_20150827000000000226_1":{
"totalCnt":1,
"startRow":1,
"endRow":5,
"result":{
"code":"INFO-000",
"message":"Normal"
},
"row":[
{
"ROW_NUM":1,
"RECIPE_ID":1,
"RECIPE_NM_KO":"Pasta",
"SUMRY":"Pasta recipe",
"NATION_CODE":"3020001",
"NATION_NM":"Italian",
"TY_CODE":"3010001",
"TY_NM":"Noodle",
"COOKING_TIME":"10min",
"CALORIE":"580Kcal"
}
]
}
}
http://data.com/openapi/sample/json/1/5?RECIPE_NM=sushi
这个有
{
"Grid_20150827000000000226_1":{
"totalCnt":1,
"startRow":1,
"endRow":5,
"result":{
"code":"INFO-000",
"message":"Normal"
},
"row":[
{
"ROW_NUM":1,
"RECIPE_ID":2,
"RECIPE_NM_KO":"Sushi",
"SUMRY":"Sushi is yummy",
"NATION_CODE":"3020001",
"NATION_NM":"Japanese",
"TY_CODE":"3010001",
"TY_NM":"rice",
"COOKING_TIME":"30min",
"CALORIE":"338Kcal"
}
]
}
}
每个页面都有不同的json数据,我想通过NATION_NM或RECIPE_NM_KO过滤数据。为此,我尝试将所有这些配方合并到一个json文件中。我该怎么做呢?或者还有其他方法吗?