New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why can't we parse a rawString back to json object? #101
Comments
try var anotherObj = JSON(str!) |
There is a problem after parsing rawString back to json object though: let json = JSON(["user":"name"]) What may I have done wrong? Thanks!! |
Same issue here.
It works |
Try public func rawData(options opt: NSJSONWritingOptions = NSJSONWritingOptions(0), error: NSErrorPointer = nil) -> NSData? |
I got the same issue with version 1.3.1 |
I had the same issue. I got it working by using JSON.parse(myString) instead |
How to remove white spaces and newlines with rawString()? |
I came across the same issue and wasted a lot of time here. The solution provided by @peterjuras finally solve my problem. This is definitely an awful bug. |
I've had the same issue, have been doubting myself for days. Thank you @peterjuras, you're solution worked. |
I feel the above solution should be part of the official document. @peterjuras Thanks for sharing. |
|
Where did you find this info?? |
@leochoo A quick search through the SwiftyJSON/Source/SwiftyJSON.swift Line 125 in 184c688
|
this does not work. Why?
The text was updated successfully, but these errors were encountered: