{"action":"created","issue":{"url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/379","labels_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/379/labels{/name}","comments_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/379/comments","events_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/379/events","html_url":"https://github.com/SwiftyJSON/SwiftyJSON/issues/379","id":114041586,"number":379,"title":"transform \\n error","user":{"login":"seedotlee","id":5188604,"avatar_url":"https://avatars.githubusercontent.com/u/5188604?v=3","gravatar_id":"","url":"https://api.github.com/users/seedotlee","html_url":"https://github.com/seedotlee","followers_url":"https://api.github.com/users/seedotlee/followers","following_url":"https://api.github.com/users/seedotlee/following{/other_user}","gists_url":"https://api.github.com/users/seedotlee/gists{/gist_id}","starred_url":"https://api.github.com/users/seedotlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seedotlee/subscriptions","organizations_url":"https://api.github.com/users/seedotlee/orgs","repos_url":"https://api.github.com/users/seedotlee/repos","events_url":"https://api.github.com/users/seedotlee/events{/privacy}","received_events_url":"https://api.github.com/users/seedotlee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-29T12:46:11Z","updated_at":"2015-10-29T14:17:06Z","closed_at":null,"body":"I try to transform the json \r\n\r\n```\r\n\"[{\\\"uid\\\":\\\"a8dc9967-5abd-475a-96a7-ce77ee9b4480\\\",\\\"id\\\":\\\"edbba732-27da-4dba-96b0-e9478577eca7\\\",\\\"name\\\":\\\"hello\\\",\\\"mem_name\\\":\\\"\\\",\\\"touser\\\":\\\"\\\",\\\"content\\\":\\\"[asdsadf]\\n[asdfasdf]\\\",\\\"min\\\":6}]\"\r\n```\r\n\r\nthan get the type is SwiftyJSON.Type.Null\r\n\r\ncan swiftyjson parsing  \"\\n\"?"},"comment":{"url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/comments/152193954","html_url":"https://github.com/SwiftyJSON/SwiftyJSON/issues/379#issuecomment-152193954","issue_url":"https://api.github.com/repos/SwiftyJSON/SwiftyJSON/issues/379","id":152193954,"user":{"login":"zhigang1992","id":1057756,"avatar_url":"https://avatars.githubusercontent.com/u/1057756?v=3","gravatar_id":"","url":"https://api.github.com/users/zhigang1992","html_url":"https://github.com/zhigang1992","followers_url":"https://api.github.com/users/zhigang1992/followers","following_url":"https://api.github.com/users/zhigang1992/following{/other_user}","gists_url":"https://api.github.com/users/zhigang1992/gists{/gist_id}","starred_url":"https://api.github.com/users/zhigang1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhigang1992/subscriptions","organizations_url":"https://api.github.com/users/zhigang1992/orgs","repos_url":"https://api.github.com/users/zhigang1992/repos","events_url":"https://api.github.com/users/zhigang1992/events{/privacy}","received_events_url":"https://api.github.com/users/zhigang1992/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T14:17:06Z","updated_at":"2015-10-29T14:17:06Z","body":"If we don't escape `\\n` then the string becomes\r\n\r\n```json\r\n[{\r\n  \"uid\": \"a8dc9967-5abd-475a-96a7-ce77ee9b4480\",\r\n  \"id\": \"edbba732-27da-4dba-96b0-e9478577eca7\",\r\n  \"name\": \"hello\",\r\n  \"mem_name\": \"\",\r\n  \"touser\": \"\",\r\n  \"content\": \"[asdsadf]\r\n  [asdfasdf]\",\r\n  \"min\": 6\r\n}]\r\n```\r\n\r\nWhich IMHO is corrupted...\r\n\r\nJSON parsing in `SwiftyJSON` is actually delegated to iOS's `NSJSONSerialization` which is where this parse is failing.\r\n\r\nAlso you can escape it simply by wrapping it with another `\\`. like `\\\\n`\r\n\r\n"}}