Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mlecho

macrumors newbie
Original poster
Mar 31, 2004
28
0
i have some JSON data coming back ..>YAY! Now the unexpected...the
format in which i get it looks like:
Code:
}, 

        { 
        content = "EXAMPLE TEXT WITH HUGE SPACES - 
\n                    TEXT,BLAH BLAH BLAH"; 
        href = "/website/link/1004.html"; 
    }, 
        { 
        content = "MORE EXAMPLE TEXT\n                    WITH MORE 
CRAZY CAPITALS AND HUGE SPACES"; 
        href = "/website/link/3000000000000672.html"; 
    },
i understand full well that the "\n" is a line break and that i must
be getting some sort of literal string. Is there a magic NSString
method i can embrace that would loose the "\n " ?
I am familiar with :
Code:
 - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target 
withString:(NSString *)replacement
but i was hoping today's problem has an encoding solution perhaps...
thanks all
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.