Converting NSMutableData to NSString Problem

Posted by Sheehan Alam on Stack Overflow See other posts from Stack Overflow or by Sheehan Alam
Published on 2010-03-13T15:10:02Z Indexed on 2010/03/13 15:15 UTC
Read the original article Hit count: 487

Filed under:
|

initWithData does not convert my data object into a string properly. When I check the length of the data object, it has a value.

NSMutableData* receivedData =[[NSMutableData data] retain];

NSString* json_string = [[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding];

Am I doing something wrong creating the string?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone-sdk