BetterCodable
BetterCodable copied to clipboard
Better Codable through Property Wrappers
Thank you for your code 👍。 The following code also works on my project, If you think it's useful, this package feels like a good home for it 🤝。 ```swift...
This is the beginning of an approach I'm considering regarding #41 to track failures. Rather than injecting logging into the system, it tracks failures such that you can check at...
Hello! This PR makes wrapped properties conditionally conform to `Sendable` when their dependencies are `Sendable`. This should help data structs using these wrappers to pass through async contexts when possible.
`let json = """ {"user_id": "abc", "name": "tattn"} """.data(using: .utf8)!` For Upper Camel Case: let json = """ {"UserId": "abc", "Name": "tattn"} """.data(using: .utf8)!
I've added a `Bool` type auto-conversion function, so if people want to add it to their projects, I'll try pulling requests. | JSON | Swift | | --------------------------------------- | -----...
I have a field `updatedON` that comes as a nil value from the api, but gets updated in the local DB after an object is updated. Not sure how to...
We started getting this warning on Xcode 13 on watchOS extension. I am not sure at the moment what symbol it is using that's extension unsafe but any help would...
I'm using a `JSONEncoder` with `dateEncodingStrategy` set to `.iso8601` like this: ```swift extension JSONEncoder { public static var iso: JSONEncoder { let encoder = JSONEncoder() encoder.dateEncodingStrategy = .iso8601 return encoder...
``` let data = """ {"a": "1"} """.data(using: .utf8)! struct A: Decodable { @DefaultFalse var a: Bool } let m = try JSONDecoder.init().decode(A.self, from: data) print(m.a) // print is false...
sometimes when error happened, we don't konw where is wrong, and debug difficultly