我的编程能力并不强,而且似乎面临着非常简单的问题。我不知道如何通过带有 json 的 REST 请求在服务器上发布数据。必须接受的格式是
{
"date": "2012-12-20 12:00:00",
"address": "asd",
"name": "asdasdasdasdasd",
"shipping_date": "2012-12-20 12:00:00",
"receiver_phone": "123456789",
"customer_phone": "123456789",
"total_price": "1234",
"items": {
"1": {
"item_id": "1",
"quantity": "1",
"type": "1",
"color_id": "0"
}
}
}
我发现一篇文章Post data in Objective C using Json但无法正确格式化我的字符串。