Well I have been trying to get a DataSet information into a tableview by using Json. When I’m trying to get the JSONValue of this string. This is two tables btw.
NSString *responseString = @”{ table0:[{\”value_key\”:1,\”value_desc\”:\”Value 1\”,\”value_seq\”:true},{\”value_key\”:1,\”value_desc\”:\”Value 1a\”,\”value_seq\”:false},{\”value_key\”:2,\”value_desc\”:\”Value 2\”,\”value_seq\”:false},{\”value_key\”:2,\”value_desc\”:\”Value 2b\”,\”value_seq\”:true}], table1:[{\”emp_key\”:1,\”emp_name\”:\”Test, Employee\”}]}”;
NSArray *luckyNumbers = [responseString JSONValue];
I get this error -JSONValue failed. Error is: Expected 'true' after initial 't'
Anyone know what it means? And how to fix it? Any help would be greatly appreciated
Yes, seems to have a pretty easy solution: You probably know that every object needs a string as a key. However you simply forgot to put table0 and table1 in quotation marks.
Invalid:
Valid: