Closed lightsprint09 closed 7 years ago
struct Foo { let bar: Array<Int> = [] } extension Foo: JSONEncodable { func toJSON() throws -> AnyObject { return try JSONEncoder.create({ (encoder) -> Void in try encoder.encode(bar, key: "bar") }) } }
This should result in the following
{ "bar": [] }
and not
{ }
Corresponding to JSONEncodable L196
This should result in the following
and not
Corresponding to JSONEncodable L196