-
Notifications
You must be signed in to change notification settings - Fork 855
Closed
Description
the data that i become from the parser are always of type NSCFArray and NSCFDictionary. It's not easy to modify the content of this classes.
my Question is: why you use NSJSONReadingOptions.AllowFragments?
with NSJSONReadingOptions.MutableContainers it works like a charm ... i get then NSArrayM and NSDictionaryM
/************ class SocketParser *********/
// Parses data for events
static func parseData(data:String) -> AnyObject? {
var err:NSError?
let stringData = data.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)
let parsed:AnyObject? = NSJSONSerialization.JSONObjectWithData(stringData!,
options: NSJSONReadingOptions.AllowFragments, error: &err)
}
Metadata
Metadata
Assignees
Labels
No labels