A Swift library for reflection-based object mapping between dictionaries, JSON, XML, and various data stores like Realm and CoreData.
EVReflection is a Swift library that uses reflection to map objects between dictionaries, JSON, XML, and data stores like Realm, CoreData, and CloudKit. It simplifies serialization and deserialization in iOS and macOS apps by automatically handling property conversion, reducing manual boilerplate code.
iOS and macOS developers working with REST APIs, local data persistence, or complex object models who need efficient and customizable object mapping without extensive manual coding.
Developers choose EVReflection for its extensive support of multiple data formats and stores, customizable converters and validators, and seamless integration with popular networking libraries like Alamofire and Moya, all while maintaining Swift's type safety and performance.
Reflection based (Dictionary, CKRecord, NSManagedObject, Realm, JSON and XML) object mapping with extensions for Alamofire and Moya with RxSwift or ReactiveSwift
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically maps objects to and from JSON, XML, dictionaries, and plists with minimal code, as shown in the easy-to-use examples parsing strings directly to objects.
Provides built-in extensions for Realm, CoreData, CloudKit, and networking libraries like Alamofire and Moya, reducing integration effort for common iOS data layers.
Allows custom property converters, validators, and key mapping through overridable functions, enabling handling of complex data structures and edge cases without boilerplate.
Supports object inheritance with dynamic type resolution during deserialization, useful for complex models as demonstrated in the polymorphism example with getSpecificType.
Known issues with nullable types, enums, arrays of nullable objects, sets, generics, and structs require workarounds, adding complexity for modern Swift codebases.
Reflection-based mapping can be slower and less efficient than compile-time solutions like Codable, especially for large datasets or frequent serialization operations.
Requires specific Swift versions (4.2+) and CocoaPods 1.7.0+, limiting adoption in projects with legacy toolchains or strict versioning policies.
While basic use is simple, leveraging custom converters or multiple data store extensions involves understanding and implementing additional protocols, increasing initial learning curve.