|
1 |
| -# FastEasyMapping |
2 |
| - |
| 1 | +[](https://github.com/Yalantis/FastEasyMapping/releases) |
| 2 | +[](https://img.shields.io/cocoapods/v/FastEasyMapping.svg) |
| 3 | +[](https://github.com/Carthage/Carthage) |
3 | 4 | [](https://travis-ci.org/Yalantis/FastEasyMapping)
|
4 | 5 | [](https://codecov.io/github/Yalantis/FastEasyMapping?branch=master)
|
5 | 6 |
|
| 7 | +# FastEasyMapping |
| 8 | +- [Overview](#overview) |
| 9 | +- [Requirements](#requirements) |
| 10 | +- [Installation](#installation) |
| 11 | + - [CocoaPods](#cocoapods) |
| 12 | + - [Carthage](#carthage) |
| 13 | +- [Usage](#usage) |
| 14 | + - [Deserialization](#deserialization) |
| 15 | + - [Serialization](#serialization) |
| 16 | +- [Mapping](#mapping) |
| 17 | + - [Attributes](#femattribute) |
| 18 | + - [Relationships](#femrelationship) |
| 19 | + - [Assignment policy](#assignment-policy) |
| 20 | +- [Uniquing](#uniquing) |
| 21 | + - [Relationship bindings](#relationship-bindings-by-pk) |
| 22 | + - [Weak relationship](#weak-relationship) |
| 23 | +- [Delegation](#delegation) |
| 24 | +- [Releases/Changelog](https://github.com/Yalantis/FastEasyMapping/releases) |
| 25 | +- [Thanks](#thanks) |
| 26 | + |
6 | 27 | ### Note
|
7 | 28 | This is a fork of [EasyMapping](https://github.com/EasyMapping/EasyMapping), a flexible and easy framework for JSON mapping.
|
8 | 29 |
|
9 |
| -## Reason |
| 30 | +## Overview |
10 | 31 | It turns out, that almost all popular libraries for JSON mapping are SLOW. The main reason for that is multiple trips to database during the lookup of existing objects. We [decided](https://yalantis.com/blog/from-json-to-core-data-fast-and-effectively/) to take an already existing [flexible solution](https://github.com/EasyMapping/EasyMapping) (i.e. EasyMapping) and improve its overall performance.
|
11 | 32 |
|
| 33 | +> Benchmark done on June/2014. Results may be outdated (EasyMapping performs nearly identical nowadays). |
| 34 | +
|
12 | 35 | <p align="center" >
|
13 | 36 | <img src="https://raw.githubusercontent.com/Yalantis/FastEasyMapping/efabb88b0831c7ece88e728b9665edc4d3af5b1f/Assets/performance.png" alt="FastEasyMapping" title="FastEasyMapping">
|
14 | 37 | </p>
|
15 | 38 |
|
16 |
| -# Installation |
17 | 39 |
|
18 |
| -#### CocoaPods: |
| 40 | +## Requirements |
| 41 | +Platform | Min Deployment Target |
| 42 | +:---: | :---: |
| 43 | +iOS | 8.0 |
| 44 | +macOS | 10.10 |
| 45 | +tvOS | 9.0 |
| 46 | +watchOS | 2.0 |
| 47 | + |
| 48 | +Build using Xcode 8.3.2+ |
| 49 | + |
| 50 | +## Installation |
| 51 | +### CocoaPods |
| 52 | +[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: |
| 53 | + |
| 54 | +```bash |
| 55 | +$ gem install cocoapods |
| 56 | +``` |
| 57 | +To integrate FastEasyMapping into your Xcode project using CocoaPods, specify it in your `Podfile`: |
| 58 | + |
19 | 59 | ```ruby
|
20 |
| -#Podfile |
21 |
| -platform :ios, '7.0' |
22 |
| -pod 'FastEasyMapping', '~> 1.1' |
| 60 | +source 'https://github.com/CocoaPods/Specs.git' |
| 61 | +platform :ios, '10.0' |
| 62 | +use_frameworks! |
| 63 | + |
| 64 | +target '<Your Target Name>' do |
| 65 | + pod 'FastEasyMapping, '~> 1.2' |
| 66 | +end |
| 67 | +``` |
| 68 | +
|
| 69 | +Then, run the following command: |
| 70 | +
|
| 71 | +```bash |
| 72 | +$ pod install |
23 | 73 | ```
|
24 |
| -or add as a static library. |
25 | 74 |
|
26 |
| -## Architecture |
| 75 | +### Carthage |
| 76 | +[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. |
27 | 77 |
|
28 |
| -### Mapping |
| 78 | +You can install Carthage with [Homebrew](http://brew.sh/) using the following command: |
29 | 79 |
|
30 |
| -* `FEMMapping` |
31 |
| -* `<FEMProperty>` |
32 |
| - - `FEMAttribute` |
33 |
| - - `FEMRelationship` |
| 80 | +```bash |
| 81 | +$ brew update |
| 82 | +$ brew install carthage |
| 83 | +``` |
34 | 84 |
|
35 |
| -### Deserialization _(JSON to Object)_ |
36 |
| -- `FEMDeserializer` |
| 85 | +To integrate FastEasyMappingRealm into your Xcode project using Carthage, specify it in your `Cartfile`: |
37 | 86 |
|
38 |
| -### Serialization _(Object to JSON)_ |
39 |
| -- `FEMSerializer` |
| 87 | +```ogdl |
| 88 | +github "Yalantis/FastEasyMapping" ~> 1.2 |
| 89 | +``` |
40 | 90 |
|
41 |
| -### Advanced Deserialization |
42 |
| -- `FEMObjectStore` |
43 |
| -- `FEMManagedObjectStore` |
44 |
| -- `FEMObjectCache` |
| 91 | +Run `carthage update` to build the framework and drag the built `FastEasyMapping.framework` into your Xcode project. |
45 | 92 |
|
46 | 93 | ## Usage
|
47 | 94 | ### Deserialization
|
@@ -562,9 +609,6 @@ During deserialization of persons collection order will be the following:
|
562 | 609 | 6. didMapObject:`Person instance` fromRepresentation:`Person Dictionary` mapping:`Person mapping`
|
563 | 610 | 7. didMapCollection:`Persons instances Array` fromRepresentation:`Persons Array` mapping:`Person mapping`
|
564 | 611 |
|
565 |
| -# Changelog |
566 |
| -Moved to [releases](https://github.com/Yalantis/FastEasyMapping/releases) |
567 |
| - |
568 | 612 | # Thanks
|
569 | 613 | * Special thanks to [lucasmedeirosleite](https://github.com/lucasmedeirosleite) for amazing framework.
|
570 | 614 |
|
|
0 commit comments