iPhone:Server response parsing issues
<p>The below is my server response. I would like to parse and use it further.</p>

<p>responseString: </p>

<pre><code>{
    "status": "1",
    "MyData": [
        {
            "Value": 1,
            "Name": "David",
            "MusicURL": "http://www.mycomany.net/musicoutput/song1.wav",
            "ImageURL": "http://www.mycomany.net/imageout/david.png"
        },
        {
            "Value": 2,
            "Name": "Martin",
            "MusicURL": "http: //www.mycomany.net/musicoutput/song1.wav",
            "ImageURL": "http: //www.mycomany.net/imageout/martin.png"
        },
        {
            "Value": 3,
            "Name": "Steve",
            "MusicURL": "http: //www.mycomany.net/musicoutput/song1.wav",
            "ImageURL": "http: //www.mycomany.net/imageout/david.png"
        }
    ]
}
</code></pre>

<p>The below is my code for trying further to parse and use it. BUT, the issue is, its not getting parsed from NSJSONSerialization, instead i'm getting NULL. Printing as responseDict:(null) ; jsonError: (null). </p>

<p><strong>Please Note</strong>,when i'm doing like this->NSString *responseString = [[NSString alloc] initWithData:theResponseData encoding:NSUTF8StringEncoding]; , i'm getting response string as the above output. But, i want it as NSDictionary for my further use.</p>

<p>Please help to resolve this issue.</p>

<p>NSMutableData *webData;</p>

<pre><code>-(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
    [webData setLength: 0];
    //    [self callGetGroup];    
}
-(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{    
    [webData appendData:data];
}

        -(void)connectionDidFinishLoading:(NSURLConnection *)connection
        {

        NSData *theResponseData = [[NSData alloc] initWithData:webData];
            if (theResponseData)
            {
    //NSString *responseString = [[NSString alloc] initWithData:theResponseData encoding:NSUTF8StringEncoding];
     //NSLog(@"responseString:%@ ;", responseString);
                NSError *jsonError;
                NSDictionary *responseDict = [NSJSONSerialization JSONObjectWithData:theResponseData options:0 error:&amp;jsonError];

        NSLog(@"responseDict:%@ ; jsonError: %@", responseDict, jsonError); // Printing as responseDict:(null) ; jsonError: (null)

        [self handleResponse :responseDict];

            }
        }


        -(void) handleResponse :(NSDictionary *) responsedata
        {
            NSString* value = NULL;

            for (id key in responsedata)
            {
                NSDictionary *currentDict = (NSDictionary *) [responsedata objectForKey:key];
                value = (NSString*)[currentDict objectForKey:@"status"];

                if ( [value intValue]==1) // success
                {

                }

            }

        }
</code></pre>
