Closed gthrb22 closed 8 years ago
If you want a SwiftJSON JSON
object instead of a dictionary, you need to configure that. See the example project:
https://github.com/bustoutsolutions/siesta/blob/master/Examples/GithubBrowser/Source/API/GithubAPI.swift#L23 https://github.com/bustoutsolutions/siesta/blob/master/Examples/GithubBrowser/Source/API/GithubAPI.swift#L86-L88
How to configure transformer for the service with models service().configureTransformer("/data/2.5/forecast/city?id=524901&APPID=fbb20b6f256459684791c9be06a8ce20") { ($0.content as JSON).arrayValue.map(ObjectModel.init) } I tried something like this but it gives cannot parse server response expected JSON but actual dictionary