Skip to content

Commit

Permalink
remove too specific generic constraints from EKSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
DenTelezhkin committed Jun 29, 2017
1 parent 5013fd1 commit 69542d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file.

# Next

* `EKSerializer` no longer implies that serializable objects need to conform to `EKMappingProtocol` or `EKManagedMappingProtocol`.

## [0.21.1](https://github.com/lucasmedeirosleite/EasyMapping/releases/tag/0.21.1)

* Fixed a bug in `EKSerializer` that prevented has one relationships from being properly serialized with non-nested keypaths.
Expand Down
8 changes: 4 additions & 4 deletions Sources/EasyMapping/EKSerializer.h
Expand Up @@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
@result parsed JSON in a form of NSDictionary.
*/
+ (NSDictionary <NSString *, id> *)serializeObject:(id<EKMappingProtocol>)object withMapping:(EKObjectMapping *)mapping;
+ (NSDictionary <NSString *, id> *)serializeObject:(id)object withMapping:(EKObjectMapping *)mapping;

/**
Convert objects to JSON representation.
Expand All @@ -52,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN
@result parsed JSON in a form of NSArray.
*/
+ (NSArray <NSDictionary <NSString *, id> *> *)serializeCollection:(NSArray<id<EKMappingProtocol>> *)collection
+ (NSArray <NSDictionary <NSString *, id> *> *)serializeCollection:(NSArray *)collection
withMapping:(EKObjectMapping *)mapping;

/**
Expand All @@ -66,7 +66,7 @@ NS_ASSUME_NONNULL_BEGIN
@result parsed JSON in a form of NSDictionary.
*/
+ (NSDictionary <NSString *, id> *)serializeObject:(id<EKManagedMappingProtocol>)object
+ (NSDictionary <NSString *, id> *)serializeObject:(id)object
withMapping:(EKManagedObjectMapping *)mapping
fromContext:(NSManagedObjectContext *)context;

Expand All @@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
@result parsed JSON in a form of NSArray.
*/
+ (NSArray <NSDictionary <NSString *, id> *> *)serializeCollection:(NSArray<id<EKManagedMappingProtocol>> *)collection
+ (NSArray <NSDictionary <NSString *, id> *> *)serializeCollection:(NSArray *)collection
withMapping:(EKManagedObjectMapping*)mapping
fromContext:(NSManagedObjectContext *)context;
@end
Expand Down

0 comments on commit 69542d2

Please sign in to comment.