How do I prevent NSJSONSerialization from adding extra backslashes to my URL strings?
NSDictionary *info = @{@\"myURL\":@\"http://www.example.com/test\"}; NS
I have tracked this issue for many years, and it is still not fixed. I believe Apple will never fix it for legacy reasons (it will break stuff).
The solution in Swift 4.2:
let fixedString = string.replacingOccurrences(of: "\\/", with: "/")
It will replace all \/ with /, and is safe to do so.
\/
/