Macoun · @macoun
173 followers · 42 posts · Server iosdev.space

Wusstest du, dass die richtige Verwendung des Codable-Protokolls dir helfen kann, effizient mit JSON-APIs zu arbeiten? Sei dabei, wenn @5sw in seinem Vortrag wertvolle Tipps und Tricks teilt!

Hol Dir jetzt Dein Ticket: macoun.de/anmelden

#codable #appentwicklung #jsonapis #effizienz #macounffm

Last updated 1 year ago

Dave Rahardja · @drahardja
1584 followers · 6280 posts · Server sfba.social

Is there really no way to specify default values for keys? Like, if a JSON key is missing, provide a default value for a struct’s property, without having to write a custom `init(from:)` initializer?

That makes it hard to dot-version rev a schema by adding keys, but continue to maintain backward-compatibility with older saved data…

#swift #codable #decodable

Last updated 1 year ago

Michael Berk · @mberk
1 followers · 8 posts · Server iosdev.space

This is so unexpected, but amazing

#swift #codable

Last updated 1 year ago

Jaanus Kase · @jaanus
285 followers · 314 posts · Server mastodon.justtact.com

Is this weird? Or normal?

I needed a type which is codable so I can archive/transmit it in various ways, which boxes a result with noncodable types.

#swift #codable

Last updated 2 years ago

Rhett Rogers · @rhett
70 followers · 539 posts · Server rogersfam.co

More work on my app.

Been trying to set it up so objects can be created and updated from the objects sent from the API using the protocol.

It has had its headaches but I got it mostly set up, even to the point of updating existing objects in the data store.

My issue comes when I hit a collection of objects. I’m not sure how to handle inside of the init(from: Decoder) when some or all of those objects are already in my store

#CoreData #codable #swift

Last updated 2 years ago