I work often with json.
There are several parser I can use when I'm developing applications for the iPhone using Objective-C, one of the problems I had, was the presence, into the results, of the "\n" characters to divide one line from another.
To remove "\n" characters within a NSString you can use the methods of the NSString class, there are several ways to do this, the way I use is the following one:
I create a new string from the original using the stringByReplacingOccurrencesOfString method.
The following piece of code will do the work:
NSString *originalString = @"\nTitle Book\nAuthor\npages";
finalString = [originalString stringByReplacingOccurrencesOfString:@"\n" withString:@""];
The first NSLog statement will produce the following output:
2013-01-13 17:21:02.046 testperxapp[2441:c07]
While the last NSLog statement will produce the following output:
2013-01-13 17:21:02.048 testperxapp[2441:c07] Title BookAuthorpages
And that's all,