let json1: JSONValue = ["Hi"] do { let data = try JSONEncoder().encode(json1) let json2 = try JSONDecoder().decode(JSONValue.self, from: data) print(json1 == json2) } catch { print(error) }