Get the App
SLTechnology News&Howtos  ›  Development  › 

How to convert an array of OC into a string in OC format in JSON

Shulou Source: shulou.com Published: 2022-06-02 11:36:02 12月01日 Update

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!

Tags: Characters strings arrays formats articles content not much most more knowledge industry information information channels channels references learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Microsoft Shulou Information Huawei Shulou Technology