How to mpa top level JSON String Array
JSON Response from server
[
"tag1",
"tag2",
"tag3",
"tag4",
"tag5",
"tag6"
]
I am Using ObjectMapper Swift
How to mpa top level JSON String Array
JSON Response from server
[
"tag1",
"tag2",
"tag3",
"tag4",
"tag5",
"tag6"
]
I am Using ObjectMapper Swift
Solved it without ObjectMapper:
On response from server cast the raw JSON into String array
...
..
case .Success(let request, _, _):
self.request = request.responseJSON{ json in
if json.result.isSuccess {
if let tags = json.result.value as? [String]{ // Cast it as String Array
self.remoteTags.removeAll()
tags.forEach{self.remoteTags.append($0)}
}
self.reloadData()
}
}
...
..
[Note: Using Alamofire for Network Operations]