1

Through a JSON parser from Google, I get a string. But it contains all the special characters in html format, such as ' instead of '.

Do you know if there is a special encoding, or some method?

1 Answer 1

3

Take a look at the Google Toolbox for Mac, specifically the GTMNSString+HTML category. - (NSString *)gtm_stringByUnescapingFromHTML; is what you need.

Sign up to request clarification or add additional context in comments.

7 Comments

Sure it does. We use this category in our ARC project. Just make sure to have the Google Toolkit files not have ARC (by default, drag+drop into project is ARC).
Let me know if you need some help.
thank you, I insert the two files in the project, go to "build phases" and on the file "GTMNSString + HTML.m" insert the flag "-fno-objc-arc". import the class #import "GTMNSString HTML.m +" in my viewcontroller.m, but I still have 4 errors related to ARC
What are the errors? Are you sure they are related to ARC? I think there were some Google dependencies which need to be removed from the .m file.
on NSString *escapeSequence; there is ARC forbids Objective-C objects in structs or unions... on const unichar *buffer = CFStringGetCharactersPtr((CFStringRef)self); there is Cast of Objective-C pointer type 'NSString *' to C pointer type 'CFStringRef' (aka 'const struct __CFString *') requires a bridged cast, the other two are like this
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.