i want to generate a JSON in Objective C , below is an example, one dictionary which has some fields, and within that dictionary i want to add another dictionary. i.e. Student dictionary can have subjects dictionary(which can have multiple items.
{
"student": {
"name": "b",
"std": "d",
"subjects": [{"id":"1","id":"2","id":"3"}]
}}
I am trying using NSJSONSerialization , i tried first creating json string of subjects dictionary but, after converting final JSON of main dictionary its showing (Slash) which is breaking json. i added subjects inside main dictionary then after converting its showing subjects json starting with (
Any suggestion what m i missing?
Thanks