我有一个像将JSON数据转换成字符串的要求,请你帮我解决。
来自服务的我的JSON数据:
{
"chathistory": [
{
"broadcastId": "123",
"caption": "",
"chattype": "CHAT_SINGLE",
"delivered": "2015-03-23T10:20",
"duration": "0"
},
{
"broadcastId": "124",
"caption": "",
"chattype": "CHAT_SINGLE",
"delivered": "2015-03-23T10:20",
"duration": "5"
}
],
"status": "success"
}
我需要将其转换为以下格式
chathistory: [
{
broadcastId: '123',
caption: '',
chattype: 'CHAT_SINGLE',
delivered: '2015-03-23T10: 20',
duration: '0'
},
{
broadcastId: '124',
caption: '',
chattype: 'CHAT_SINGLE',
delivered: '2015-03-23T10: 30',
duration: '5'
}
]
谢谢, 斯里达尔