struct NestedObject : Codable {
var name : String?
var text : [String]?
}
struct Foobar : Codable {
var foo : String?
var nested : [NestedObject]?
}
struct Compendium: Codable {
var foobars: [Foobar]
enum CodingKeys: String, CodingKey {
case foobars = "foobar"
}
}
The empty text in the last nested object fails to decode. I think cause the String inside the array isn't optional, so when not there, the decoder freaks out? Not sure...any help would be appreciated!
This might be user error, or might be related to https://github.com/MaxDesiatov/XMLCoder/pull/101 not really sure. I am trying to decode:
My structs:
The empty text in the last nested object fails to decode. I think cause the String inside the array isn't optional, so when not there, the decoder freaks out? Not sure...any help would be appreciated!