{"action":"created","issue":{"url":"https://api.github.com/repos/Moya/Moya/issues/816","repository_url":"https://api.github.com/repos/Moya/Moya","labels_url":"https://api.github.com/repos/Moya/Moya/issues/816/labels{/name}","comments_url":"https://api.github.com/repos/Moya/Moya/issues/816/comments","events_url":"https://api.github.com/repos/Moya/Moya/issues/816/events","html_url":"https://github.com/Moya/Moya/issues/816","id":192781152,"number":816,"title":"JSON response shown in some other form when using custom transformations","user":{"login":"Dharin-shah","id":8616130,"avatar_url":"https://avatars.githubusercontent.com/u/8616130?v=3","gravatar_id":"","url":"https://api.github.com/users/Dharin-shah","html_url":"https://github.com/Dharin-shah","followers_url":"https://api.github.com/users/Dharin-shah/followers","following_url":"https://api.github.com/users/Dharin-shah/following{/other_user}","gists_url":"https://api.github.com/users/Dharin-shah/gists{/gist_id}","starred_url":"https://api.github.com/users/Dharin-shah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dharin-shah/subscriptions","organizations_url":"https://api.github.com/users/Dharin-shah/orgs","repos_url":"https://api.github.com/users/Dharin-shah/repos","events_url":"https://api.github.com/users/Dharin-shah/events{/privacy}","received_events_url":"https://api.github.com/users/Dharin-shah/received_events","type":"User","site_admin":false},"labels":[{"id":122272862,"url":"https://api.github.com/repos/Moya/Moya/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-12-01T08:22:31Z","updated_at":"2016-12-01T14:32:58Z","closed_at":null,"body":"<!-- Please wrap code blocks in backticks, like so:  -->\r\nHeres what i am using\r\n```swift\r\nopen class LfArrayStringTransform : TransformType {\r\n    public typealias Object = String\r\n    public typealias JSON = [[String]]\r\n    \r\n    public init() {}\r\n    \r\n    open func transformFromJSON(_ value : Any?) -> String?{\r\n    /* This Prints\r\nOptional({\r\n    email =     (\r\n        \"The email has already been taken.\"\r\n    );\r\n    \"mobile_number\" =     (\r\n        \"The mobile number has already been taken.\"\r\n    );\r\n})\r\n*/   \r\n print(value)\r\n\r\n        do{\r\n            let jsonData = try JSONSerialization.data(withJSONObject: value, options: []) as? [AnyHashable : Any]\r\n            print(jsonData) // this is nil\r\n        }catch{\r\n        }\r\n/*Goes in there (obvious it was , silly me)*/\r\n        if let someValue = value as? Any{\r\n            \r\n        }\r\n        /* Not Going in Here */\r\n        if let arrayValue = value as? [[String]]{\r\n            return arrayValue.flatMap({ (value) -> String in\r\n               return value.joined(separator: \", \")\r\n            }).joined(separator: \", \")\r\n        }\r\n        return nil\r\n    }\r\n    \r\n    open func transformToJSON(_ value: String?) -> [[String]]? {\r\n        return nil\r\n    }\r\n}\r\n```\r\n\r\nI want to transform the json data that i am receiving myself. But the object that i am receiving or which is printed does not have a standard structure. \r\nAm I missing something here?\r\n\r\n<!--\r\nThe code will automatically get its syntax highlighted, and doesn't need to be indented 4 spaces to be shown as code.\r\n\r\nWhen referencing a dependancy manager-related issue (think CocoaPods, Carthage, SwiftPM), please add its configuration file to the issue.\r\nIt would be helpful to put the contents in a code block too, using ```ruby for CocoaPods and ```swift for SwiftPM.\r\n\r\nAlso please make sure your title describes your problem well. Questions end with a question mark.\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/Moya/Moya/issues/comments/264187612","html_url":"https://github.com/Moya/Moya/issues/816#issuecomment-264187612","issue_url":"https://api.github.com/repos/Moya/Moya/issues/816","id":264187612,"user":{"login":"BasThomas","id":4190298,"avatar_url":"https://avatars.githubusercontent.com/u/4190298?v=3","gravatar_id":"","url":"https://api.github.com/users/BasThomas","html_url":"https://github.com/BasThomas","followers_url":"https://api.github.com/users/BasThomas/followers","following_url":"https://api.github.com/users/BasThomas/following{/other_user}","gists_url":"https://api.github.com/users/BasThomas/gists{/gist_id}","starred_url":"https://api.github.com/users/BasThomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BasThomas/subscriptions","organizations_url":"https://api.github.com/users/BasThomas/orgs","repos_url":"https://api.github.com/users/BasThomas/repos","events_url":"https://api.github.com/users/BasThomas/events{/privacy}","received_events_url":"https://api.github.com/users/BasThomas/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T14:32:57Z","updated_at":"2016-12-01T14:32:57Z","body":"The way your JSON is printed might be confusing, but seems to not be the issue here."}}
{"actor":{"display_login":"BasThomas"}}