How to convert an array of OC into a string in OC format in JSON
Editor to share with you how to convert the array of OC into strings in OC format in JSON, I believe most people don't know much about it, so share this article for your reference. I hope you can learn a lot after reading this article. Let's learn about it together.
1. Convert an array of OC to a string in OC format
NSArray * arr = @ [@ "aa", @ "bb", @ "cc"]
two。 Transform
NSString * jsonStr = [arr JSONString]
NSLog (@ "% @", jsonStr)
These are all the contents of the article "how to convert an array of OC into a string in OC format in JSON". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!