JSON in COCOA (with YAJL)
- by mekanics
at first, sry for my english... :)
I'm using the YAJL Framework http://github.com/gabriel/yajl-objc
My file look like this:
[ [ 3753700,
{ "altitude" : 36950,
"heading" : 129.918421384319,
"latitude" : 47.554033252495699,
"longitude" : 8.2125612837369903,
"pointType" : "EXTRAPOLATED",
"speed" : 455.04395392093699,
"timestamp" : 1273252673301,
"verticalRate" : 0.0
}
],
[ 3753700,
{ "altitude" : 36950,
"heading" : 129.918421384319,
"latitude" : 47.552708437680799,
"longitude" : 8.2149074662342798,
"pointType" : "EXTRAPOLATED",
"speed" : 455.04395392093699,
"timestamp" : 1273252674555,
"verticalRate" : 0.0
}
]
]
I've tried it in x-variant, but I always get a 'NSInvalidArgumentException'
from console:
2010-05-07 20:17:30.998 testApp[2365:207] *** -[NSConcreteData yajl_JSON]: unrecognized selector sent to instance 0x1353d0
2010-05-07 20:17:31.006 testApp[2365:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSConcreteData yajl_JSON]: unrecognized selector sent to instance 0x1353d0'
How to read the data correctly?
thx for help