I'm trying to use Swift 4 Codable feature to get JSON but for some reason it creates an error that says:
Argument type string does not conform to expected type decoder
Here is my code:

import UIKit
struct aURL : Codable {
let title: String
let aurl: String
// let style: URLStyle
}
class SectionTableViewController: UITableViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(true)
do {
let queue = DispatchQueue(label: "cool")
queue.async {
if let somedata = try? Data(contentsOf: URL(from: "http://json-schema.org/example/geo.json")!, options: []) {
let json = try? JSONSerialization.jsonObject(with: somedata, options: [])
print(json)
DispatchQueue.main.async {
}
}
}
} catch let error as NSError {
print("Error: \(error)")
}
}
and if I try to fix it using Xcode suggested fix as shown in the image:

I get this error:

Could not cast value of type 'Swift.String' (0x1015acf68) to 'Swift.Decoder' (0x1015ec460).