Releases: lucasmedeirosleite/EasyMapping
Releases · lucasmedeirosleite/EasyMapping
0.18.0
New
- All API was annotated for nullability, allowing better interoperability with Swift
- Added
mapPropertiesFromUnderscoreToCamelCase:
method onEKObjectMapping
, that allows mapping underscored JSON keypaths to camel-cased properties.
For example:
[mapping mapPropertiesFromUnderscoreToCamelCase:@[@"created_at",@"car_id"]];
will map created_at
and car_id
keypaths to createdAt
and carId
properties in your model.
Fixed
- When using
mapKeyPath:toProperty:withValueBlock:
method andignoreMissingFields
property onEKObjectMapping
is set toYES
, value block will no longer be called, if value in JSON is nil
Deprecations
NSDateFormatter
extension withek_formatterForCurrentThread
is deprecated and slated to be removed in release for Xcode 8, which drops support for iOS 7 and lower. This property is no longer useful, becauseNSDateFormatter
is thread safe from iOS 7 and higher, and there's no reason to storeNSDateFormatter
in thread dictionary anymore.
Removals
Following deprecated methods were removed:
serializedObject
onEKManagedObjectModel
. UseserializedObjectInContext:
instead.mapKeyPath:toProperty:withDateFormat:
method onEKObjectMapping
. UsemapKeyPath:toProperty:withDateFormatter:
method instead.
0.17.0
Changed
- Improved CoreData importer perfomance by using NSMutableSet instead of NSSet copies(thanks, @adrian-gierakowski)
0.16.0
Added
ignoresMissingFields
property onEKObjectMapping
, that allows skipping nil or NSNull values when mapping to object. Defaults to NO.
0.15.3
Fixes
- Better Carthage/ObjectiveC++ support
0.15.0
Features
Introduced new property on EKObjectMapping - respectPropertyFoundationTypes.
When set to YES, your class will be introspected in mapping process, and mapper will try to create objects, that have the same type, as your properties. For example, you might have a NSSet property, that you want to create from JSON array.
Supported types: NSMutableArray, NSMutableDictionary, NSSet, NSOrderedSet, NSMutableSet, NSMutableOrderedSet.
Due to perfomance reasons, this behaviour is turned off by default.
Bugfixes
- Prevent crash, that could happen, when JSON array contained null objects(@kolyuchiy in a623bd7)
0.14.2
Changes
- Nullability annotations were removed
0.14.1
Changes
- Added support for Carthage! 👍
- Nullability annotations has been slightly adjusted for EasyMapping blocks and should be more friendly to autocomplete( at least AppCode's autocomplete, but hopefully to XCode's too, when Apple fixes nullability bugs, that exist in XCode 6.3)
0.14.0
Changes
- Dropped support for XCode 6.2 and lower
0.13.0
Enhancements
- Added nullability annotations for XCode 6.3 and Swift 1.2. Annotations should be backwards compatible with previous XCode releases.
Fixes
- Fixes a bug, that could prevent NSDate property to be updated from new representation, if JSON contained null value
0.12.3
Changes
EKManagedObjectModel
serializedObject
method is deprecated, please useserializedObjectInContext:
instead.