Closed ljd1bg closed 4 months ago
I've tried this:
public struct LocationDetails: Decodable {
public let id: String
public let time_zone: String
public let postal_code: String
}
And it still fails after the first time... I'm very confused 😕
Have you tried just decoding the JSON string without introducing the endpoint? This seems more like a datapoint issue.
Seems that was the case... strange, thanks! :)
Describe the bug Fails to decode a key that is present (but only after the first time).
But this is the response (always the same of course):
Here is my model:
To Reproduce Steps to reproduce the behavior:
"No value associated with key CodingKeys(stringValue: \"time_zone\", intValue: nil) (\"time_zone\")."
Expected behavior I expect to correctly parse the model everytime.
Screenshots
Expanded macro:
Environment (please complete the following information, remove ones not applicable):
Additional context The macro looks fine, and I thought it might have something to do with
time_zone
string, but I commented it out and it gave me the same error (only after the first time) forpostal_code
as well.