【问题标题】:How to convert string to json with jsonkit in xcode?如何在xcode中使用jsonkit将字符串转换为json?
【发布时间】:2011-08-31 08:24:34
【问题描述】:

我该怎么做? 尝试了几种方法,例如

NSString *data2 = [data JSONString];
dataLabel.text = @"%data2%";

我想在 dataLabel 中添加更多文本

【问题讨论】:

    标签: iphone xcode json xcode4


    【解决方案1】:

    这将在您的 json 字符串之后添加更多文本,我假设这就是您的意思?

    dataLabel.text = [NSString stringWithFormat:@"%@ - more text here", data2];
    

    【讨论】:

      【解决方案2】:

      使用SBJson 将其转换为 JSON 对象

      NSString *JSONString = [string JSONRepresentation];
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-03-23
        • 2016-08-12
        • 2015-09-16
        • 2011-03-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多