我正尝试在iPhone上使用json-framework来解析json字符串。 当我调用这个方法:JSON验证
NSDictionary *dictionary = [jsonString JSONValue];
,我发现了错误:
"Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Object value expected for key:
Options\" UserInfo=0x4b5f390 {NSUnderlyingError=0x4b5f320 \"Expected value while
parsing array\", NSLocalizedDescription=Object value expected for key: Options}"
根据这个JSON验证[1]:http://www.jsonlint.com//我的JSON是无效的。但是那样吗?
我的JSON字符串看起来是这样的:
{
"Options": [
{
"ID": "7",
"A": "1",
"EAt": new Date(2011,
0,
7,
12,
30,
0),
"Type": "Binary",
}
}
*编辑JSON:(仍然带来了一个错误)
{
"Options": [
{
"ID": "7",
"A": "1",
"EAt": new Date(2011,
0,
7,
12,
30,
0),
"Type": "Binary"
}
]
}
删除逗号后...二进制“ – powtac 2011-01-07 12:19:41