ExCodable icon indicating copy to clipboard operation
ExCodable copied to clipboard

An Extension of Swift Codable - Encode/Decode Model into JSON and back

Results 4 ExCodable issues
Sort by recently updated
recently updated
newest added

比如这样一个模型 ```swift struct Coord: ExCodable { private(set) var y: Int = 0 private(set) var x: Int = 0 private(set) var w: Int = 0 private(set) var h: Int = 0...

question

這庫很棒!~ // JSON: { "uid":888888, "obj": { "test1": "xxxx", "test2": "xxxx" } } 某天变成: // JSON: { "uid":888888, "obj": [] } 后端PHP, 请问这样母模型还能转换出来么? 如何定义model

question

让 [String: Any], [Any]支持Codable,模型定义如下 struct testModel: ExAutoCodable { @ExCodable var jumpParam: [String: Any]? = [:] @ExCodable var matchs: [Any] = [] }

https://github.com/levantAJ/AnyCodable https://stackoverflow.com/questions/44603248/how-to-decode-a-property-with-type-of-json-dictionary-in-swift-45-decodable-pr