Codable implementations with macros.
MetaCodable framework exposes custom macros which can be used to generate dynamic
Codable implementations. The core of the framework is
Codable() macro which generates the implementation aided by data provided with using other macros.
MetaCodable aims to supercharge your
Codable implementations by providing these inbox features:
- Allows custom
CodingKeyvalue declaration per variable, instead of requiring you to write all the
CodedAt(_:)passing single argument.
- Allows to create flattened model for nested
- Allows to create composition of multiple
CodedAt(_:)passing no arguments.
- Allows to provide default value in case of decoding failures with
- Allows to create custom decoding/encoding strategies with
HelperCoderand using them with
- Allows to ignore specific properties from decoding/encoding with
- Allows to use camel-case names for variables according to Swift API Design Guidelines, while enabling a type to work with different case style keys with
- Allows to ignore all initialized properties of a type from decoding/encoding with
IgnoreCodingInitialized()unless explicitly asked to decode/encode by attaching any coding attributes, i.e.
|Platform||Minimum Swift Version||Installation||Status|
|iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 6.0+||5.9||Swift Package Manager||Fully Tested|
|Linux||5.9||Swift Package Manager||Fully Tested|
|Windows||5.9||Swift Package Manager||Fully Tested|
MetaCodable allows to get rid of boiler plate that was often needed in some typical
Codable implementations with features like:
Custom `CodingKey` value declaration per variable, instead of requiring you to write for all fields.
Create flattened model for nested `CodingKey` values.
Provide default value in case of decoding failures.
See the full documentation for API details and advanced use cases.
Is it okay to use runBlocking?
In this video I’ll talk about when it’s fine to use the runBlocking function from Kotlin coroutines and when you...
Mobile App Development Best Practices – 07.12
KSP2 Preview, Mastering in SwiftUI, How to implement gamification and more!
Gemini is the new foundation for artificial intelligence in Android
Foundation models are trained on a variety of data sources to create artificial intelligence systems that can adapt to a...
Google has released AlphaCode 2 based on Gemini
Google today, along with its Gemini artificial intelligence model, unveiled AlphaCode 2, an improved version of the AlphaCode code generator...
ColorfulX – Metal for crafting multi-colored gradients
ColorfulX is an implementation using Metal for crafting multi-colored gradients. ColorfulX Platform UIKit and AppKit platforms are generally supported. Due to MTKView not...
Mobile App Development Best Practices – 06.12
Power of enums, A New Foundation for AI on Android, developer dogmas and more!