我有我想創建併發送到服務器的這個JSON文件。我是使用JSON的新手,所以請有人指導我如何創建此對象?如何在Swift中創建這個JSON對象
{
"today_steps": 5663,
"activities": [{
"activity_name": "Walking",
"start_datetime": "2016-07-03 10:03AM",
"activity_duration": 2768000,
"steps": 1362,
"average_heart": 96,
"calories": 109
}, {
"activity_name": "Running",
"start_datetime": "2016-07-03 02:45PM",
"activity_duration": 1768000,
"steps": 2013,
"average_heart": 112,
"calories": 271
}],
"workout": []
}
[在swift 2中解析json對象]可能的副本(http://stackoverflow.com/questions/35093112/parse-json-object-in-swift-2) –