我正在尝试构建REST Web服务,但我不知道返回结果的正确方法。你能给我一些提示吗?
/countries/{id_country}/cities/{id_cities}/categories/
资源链接和资源描述的一些部分
[ { "id": 1,
"name": "cine",
"url": "http://domain/countries/1/cities/1/categories/1"
},
{ "id": 2,
"name": "restaurante",
"url": "http://domain/countries/1/cities/1/categories/2"
}
]
资源链接
[ { "url": "http://domain/countries/1/universities/1/categories/1" },
{ "url": "http://domain/countries/1/universities/1/categories/2" },
]
资源描述
[ { "id": 1,
"name": "cine",
"description": "text text",
"url": "http://domain/countries/1/cities/1/categories/1" },
{ "id": 2,
"name": "restaurante",
"description": "text text",
"url": "http://domain/countries/1/cities/1/categories/2" }
]