我消費,在POST/PUT動詞預計這樣的JSON Web服務:刪除JSON根元素數據
{
"id":"CACTU",
"companyName": "Cactus Comidas para llevar",
"contactName": "Patricio Simpson",
"contactTitle": "Sales Agent",
"address": "Cerrito 333",
"city": "Buenos Aires",
"postalCode": "1010",
"country": "Argentina",
"phone": "(1) 135-5555",
"fax": "(1) 135-4892"
}
但灰燼數據發送JSON是這樣的:
{
"customer":
{
"id":"CACTU",
"companyName": "Cactus Comidas para llevar",
"contactName": "Patricio Simpson",
"contactTitle": "Sales Agent",
"address": "Cerrito 333",
"city": "Buenos Aires",
"postalCode": "1010",
"country": "Argentina",
"phone": "(1) 135-5555",
"fax": "(1) 135-4892"
}
}
如何在發送POST/PUT操作時刪除「customer」根元素?
看看這個線程http://stackoverflow.com/questions/17429426/ember-js-rest-adapter-without-json-root – melc
@melc似乎只涉及GET請求 – Merrin