I currently have an ordered JSON string being passed into my iPhone app, which is then being parsed using the JSON Framework.
The data is as follows:
"league_table": object{
"Premiership": array[6],
"Championship": array[6],
"Division 1": array[6],
"Division 2": array[6],
"Division 3": array[6]
}
However when it parses that, it throws out a weird order.
Division 2
Division 1
Championship
"Division 3"
Premiership
Which I got by calling : NSLog(@"%@",[dictionaryValue allKeys]);.
Has anyone experienced this before? Any idea what to do to sort it again?
UPDATE ::
The shortened UN-Parsed JSON is here :
{"league_table":
{
"Premiership":[],
"Championship":[],
"Division 1":[],
"Division 2":[],
"Division 3":[]}
}
As far as I can tell, this is a Key/Value Pair, so it should be parsed in the same order. For instance going to http://json.parser.online.fr/ and pasting that in will parse it in the correct order. However the JSON-Framework doesn't parse it the same, it parses it in a strange order with no real sorting going on