rai*_*ien 0 iphone xcode objective-c ios4
[[["????","Hello world","N n h o sh ji "]],,"en"]
Run Code Online (Sandbox Code Playgroud)
这是json对象: contentOfResponseDataInJsonValue
我想得到????.怎么样?
NSString *returnStr=[[[[contentOfResponseDataInJsonValue JSONValue] objectAtIndex:0] objectAtIndex:0] objectAtIndex:0] ;
Run Code Online (Sandbox Code Playgroud)
这样做,错误:
JSONValue失败了.错误跟踪是:("Error Domain = org.brautaset.JSON.ErrorDomain Code = 3 \"无法识别的前导字符\"UserInfo = 0x739f0c0 {NSLocalizedDescription =无法识别的前导字符}","错误域= org.brautaset.JSON.ErrorDomain代码= 3 \"解析数组时的预期值\"UserInfo = 0x739f140 {NSUnderlyingError = 0x739f120 \"无法识别的前导字符\",NSLocalizedDescription =解析数组时的预期值}"
看一下json.org的语法图表,我会说在数组中有两个逗号是没有关系的.你的JSON格式不正确.
[[["????","Hello world","N n h o sh ji "]],,"en"]
^^ not allowed!
Run Code Online (Sandbox Code Playgroud)
编辑:为了证明我的观点,这里是一个JSON验证器.
| 归档时间: |
|
| 查看次数: |
3274 次 |
| 最近记录: |