-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Description
Ran into a SwiftyJSON compatibility issue that only occurs when a ':' appears in the parsed string. Here's the code:
struct Model: Codable {
let name: String
let repo: JSON?
}
let model = Model(name: "Yams", repo: "git:Yams")
let encoder = YAMLEncoder()
let encodeStr = try! encoder.encode(model)
let newModel = try! decoder.decode(RuleRepo.self, from: encodeStr)
print(newModel.repo) // output: Optional(0)the key is the : of git:Yams.
Metadata
Metadata
Assignees
Labels
No labels