I am using get json data from the remote and using JSON (data) in swift with SwiftyJson, now the problem is what I am doing:
println(jsonObj.object)
I get the following:
{
id = 3642;
name = "Test";
"front_image" = "/image/dasad.jpg";
"is_new" = 0;
price = "100";
}
I have a problem because some keys in this object are with double quotes, some without, so I cannot get the value with jsonObj.objectForKey("front_image")!.string
When I see the json url from the browser, this is what I get:
{
"id" = 3642;
"name" = "Test";
"front_image" = "/image/dasad.jpg";
"is_new" = 0;
"price" = "100";
}
Is this a SwiftyJson error, or? What is the solution for this?
source
share