Elegant way to view JSONEncode() output in swift

Viewed 9184
var test = [String : String] ()
test["title"] = "title"
test["description"] = "description"

let encoder = JSONEncoder()
let json = try? encoder.encode(test)

How can I see the output of the json?

If I use print(json) the only thing I get is Optional(45 bytes)

2 Answers
Related