json 文字列を動的に生成し、サーバーに送信する必要があります。を使用してそれを行う方法を知っている体はありますかNSJSONSerialization
。以下は私の文字列です
{
"surveyid": "Survey1",
"responsetime": "dd/mm/yyyy hh:mm:ss",
"location": null,
"surveyresponses": [
{
"questionid": "111",
"responses": [
{
"response": "Good",
"optionid": 1,
"language": "en"
}
]
},
{
"questionid": "112",
"responses": [
{
"response": "bad",
"optionid": 2,
"language": "en"
}
]
}
]
}
string.json を作成するにはどうすればよいですか?