New to Swift/iphone dev ...
If I have a string in json that is an array of objs, it can start with a bracket '['. According to the json spec, afaik, this is okay. However, the following blows up as a unit test in swift/xcode:
var json = "[{\"class\":\"ProductDesign\"},{\"class\":\"ProductDesign\"}]"
let jsonObject : AnyObject! = NSJSONSerialization.JSONObjectWithData(json.dataUsingEncoding(NSUTF8StringEncoding), options: NSJSONReadingOptions.MutableContainers, error: nil) as NSDictionary
I've seen blog write-ups of people doing exactly this but it does not work for me (xcode does some funny stuff, popping up :
0x287784: je 0x28778d ; swift_dynamicCastObjCClassUnconditional + 61
0x287786: addl $0x10, %esp
0x287789: popl %esi
0x28778a: popl %edi
0x28778b: popl %ebp
0x28778c: retl
0x28778d: leal 0xea35(%esi), %eax
0x287793: movl 0x468ef(%esi), %ecx
0x287799: movl %eax, 0x8(%ecx)
0x28779c: movl $0x0, 0xc(%ecx)
0x2877a3: int3
0x2877a4: nopw %cs:(%eax,%eax)
Any ideas? Bug in this release?? Programmer stupidity?