以後寫RESTful API格式定義有依可循了
(jsonapi.org)
我有貼過類似的1 看起來和 Spring Data Rest 有點差異。我實作起來像這樣。
{
"_links" : {
"self" : {
"href" : "http://talkevent.info:8080/talk{?page,size,sort}",
"templated" : true
}
},
"_embedded" : {
"talk" : [ {
"topic" : "ss",
"description" : "h",
"startDate" : "2015-03-30 02:41",
"endDate" : "1111-01-01 01:01",
"_links" : {
"self" : {
"href" : "http://talkevent.info:8080/talk/2a6ce08b-8965-e52c-a6b4-186400d5a03c"
}
}
}, {
"topic" : "e",
"description" : "e",
"startDate" : "2015-03-30 05:38",
……