浏览代码

Update Xcode project

ibireme 8 年之前
父节点
当前提交
c7df27538c
共有 100 个文件被更改,包括 1277 次插入7507 次删除
  1. 214 673
      Benchmark/ModelBenchmark.xcodeproj/project.pbxproj
  2. 10 0
      Benchmark/ModelBenchmark.xcworkspace/contents.xcworkspacedata
  3. 93 0
      Benchmark/ModelBenchmark/Assets.xcassets/AppIcon.appiconset/Contents.json
  4. 27 0
      Benchmark/ModelBenchmark/Base.lproj/LaunchScreen.storyboard
  5. 0 45
      Benchmark/ModelBenchmark/Base.lproj/LaunchScreen.xib
  6. 22 19
      Benchmark/ModelBenchmark/Base.lproj/Main.storyboard
  7. 0 7
      Benchmark/ModelBenchmark/Cartfile.bak
  8. 0 9
      Benchmark/ModelBenchmark/GithubUserBenchmark.swift.bak
  9. 6 6
      Benchmark/ModelBenchmark/GithubUserModel/GitHubUser.h
  10. 19 19
      Benchmark/ModelBenchmark/GithubUserModel/GitHubUser.m
  11. 624 0
      Benchmark/ModelBenchmark/GithubUserModel/SwiftGithubUser.swift
  12. 0 0
      Benchmark/ModelBenchmark/GithubUserModel/user.json
  13. 0 99
      Benchmark/ModelBenchmark/GithubUserObjectMapper.swift.bak
  14. 0 38
      Benchmark/ModelBenchmark/Images.xcassets/AppIcon.appiconset/Contents.json
  15. 10 14
      Benchmark/ModelBenchmark/Info.plist
  16. 0 158
      Benchmark/ModelBenchmark/JSWeiboModel.m
  17. 16 0
      Benchmark/ModelBenchmark/SwiftModel.swift
  18. 50 22
      Benchmark/ModelBenchmark/ViewController.m
  19. 0 0
      Benchmark/ModelBenchmark/WeiboModel/DateFormatter.h
  20. 0 0
      Benchmark/ModelBenchmark/WeiboModel/DateFormatter.m
  21. 0 0
      Benchmark/ModelBenchmark/WeiboModel/FEWeiboModel.h
  22. 0 0
      Benchmark/ModelBenchmark/WeiboModel/FEWeiboModel.m
  23. 0 0
      Benchmark/ModelBenchmark/WeiboModel/JSWeiboModel.h
  24. 158 0
      Benchmark/ModelBenchmark/WeiboModel/JSWeiboModel.m
  25. 0 0
      Benchmark/ModelBenchmark/WeiboModel/MJWeiboModel.h
  26. 0 0
      Benchmark/ModelBenchmark/WeiboModel/MJWeiboModel.m
  27. 0 0
      Benchmark/ModelBenchmark/WeiboModel/MTWeiboModel.h
  28. 0 0
      Benchmark/ModelBenchmark/WeiboModel/MTWeiboModel.m
  29. 1 1
      Benchmark/ModelBenchmark/WeiboModel/YYWeiboModel.h
  30. 0 0
      Benchmark/ModelBenchmark/WeiboModel/YYWeiboModel.m
  31. 0 0
      Benchmark/ModelBenchmark/WeiboModel/weibo.json
  32. 27 0
      Benchmark/Podfile
  33. 0 15
      Benchmark/Vendor/FastEasyMapping/Core/Assignment Policy/FEMAssignmentPolicy.h
  34. 0 60
      Benchmark/Vendor/FastEasyMapping/Core/Assignment Policy/FEMAssignmentPolicy.m
  35. 0 18
      Benchmark/Vendor/FastEasyMapping/Core/Assignment Policy/FEMRelationshipAssignmentContext+Internal.h
  36. 0 31
      Benchmark/Vendor/FastEasyMapping/Core/Assignment Policy/FEMRelationshipAssignmentContext.h
  37. 0 49
      Benchmark/Vendor/FastEasyMapping/Core/Assignment Policy/FEMRelationshipAssignmentContext.m
  38. 0 19
      Benchmark/Vendor/FastEasyMapping/Core/Cache/FEMManagedObjectCache.h
  39. 0 96
      Benchmark/Vendor/FastEasyMapping/Core/Cache/FEMManagedObjectCache.m
  40. 0 63
      Benchmark/Vendor/FastEasyMapping/Core/Deserializer/FEMDeserializer.h
  41. 0 274
      Benchmark/Vendor/FastEasyMapping/Core/Deserializer/FEMDeserializer.m
  42. 0 5
      Benchmark/Vendor/FastEasyMapping/Core/Deserializer/FEMManagedObjectDeserializer.h
  43. 0 5
      Benchmark/Vendor/FastEasyMapping/Core/Deserializer/FEMObjectDeserializer.h
  44. 0 53
      Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMAttribute.h
  45. 0 105
      Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMAttribute.m
  46. 0 7
      Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMManagedObjectMapping.h
  47. 0 67
      Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMMapping.h
  48. 0 203
      Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMMapping.m
  49. 0 5
      Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMObjectMapping.h
  50. 0 10
      Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMProperty.h
  51. 0 63
      Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMRelationship.h
  52. 0 99
      Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMRelationship.m
  53. 0 12
      Benchmark/Vendor/FastEasyMapping/Core/Serializer/FEMSerializer.h
  54. 0 99
      Benchmark/Vendor/FastEasyMapping/Core/Serializer/FEMSerializer.m
  55. 0 20
      Benchmark/Vendor/FastEasyMapping/Core/Store/FEMManagedObjectStore.h
  56. 0 89
      Benchmark/Vendor/FastEasyMapping/Core/Store/FEMManagedObjectStore.m
  57. 0 24
      Benchmark/Vendor/FastEasyMapping/Core/Store/FEMObjectStore.h
  58. 0 48
      Benchmark/Vendor/FastEasyMapping/Core/Store/FEMObjectStore.m
  59. 0 30
      Benchmark/Vendor/FastEasyMapping/Extensions/Collection/FEMExcludableCollection.h
  60. 0 61
      Benchmark/Vendor/FastEasyMapping/Extensions/Collection/FEMExcludableCollection.m
  61. 0 30
      Benchmark/Vendor/FastEasyMapping/Extensions/Collection/FEMMergeableCollection.h
  62. 0 65
      Benchmark/Vendor/FastEasyMapping/Extensions/Collection/FEMMergeableCollection.m
  63. 0 10
      Benchmark/Vendor/FastEasyMapping/Extensions/Foundation/NSArray+FEMPropertyRepresentation.h
  64. 0 32
      Benchmark/Vendor/FastEasyMapping/Extensions/Foundation/NSArray+FEMPropertyRepresentation.m
  65. 0 9
      Benchmark/Vendor/FastEasyMapping/Extensions/Foundation/NSObject+FEMKVCExtension.h
  66. 0 15
      Benchmark/Vendor/FastEasyMapping/Extensions/Foundation/NSObject+FEMKVCExtension.m
  67. 0 29
      Benchmark/Vendor/FastEasyMapping/FastEasyMapping.h
  68. 0 11
      Benchmark/Vendor/FastEasyMapping/Utility/FEMMappingUtility.h
  69. 0 26
      Benchmark/Vendor/FastEasyMapping/Utility/FEMMappingUtility.m
  70. 0 14
      Benchmark/Vendor/FastEasyMapping/Utility/FEMRepresentationUtility.h
  71. 0 79
      Benchmark/Vendor/FastEasyMapping/Utility/FEMRepresentationUtility.m
  72. 0 8
      Benchmark/Vendor/FastEasyMapping/Utility/FEMTypeIntrospection.h
  73. 0 36
      Benchmark/Vendor/FastEasyMapping/Utility/FEMTypeIntrospection.m
  74. 0 4
      Benchmark/Vendor/FastEasyMapping/Utility/FEMTypes.h
  75. 0 350
      Benchmark/Vendor/JSONModel/JSONModel/JSONModel.h
  76. 0 1396
      Benchmark/Vendor/JSONModel/JSONModel/JSONModel.m
  77. 0 60
      Benchmark/Vendor/JSONModel/JSONModel/JSONModelArray.h
  78. 0 145
      Benchmark/Vendor/JSONModel/JSONModel/JSONModelArray.m
  79. 0 73
      Benchmark/Vendor/JSONModel/JSONModel/JSONModelClassProperty.h
  80. 0 60
      Benchmark/Vendor/JSONModel/JSONModel/JSONModelClassProperty.m
  81. 0 114
      Benchmark/Vendor/JSONModel/JSONModel/JSONModelError.h
  82. 0 93
      Benchmark/Vendor/JSONModel/JSONModel/JSONModelError.m
  83. 0 40
      Benchmark/Vendor/JSONModel/JSONModelCategories/NSArray+JSONModel.h
  84. 0 28
      Benchmark/Vendor/JSONModel/JSONModelCategories/NSArray+JSONModel.m
  85. 0 35
      Benchmark/Vendor/JSONModel/JSONModelLib.h
  86. 0 90
      Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONAPI.h
  87. 0 152
      Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONAPI.m
  88. 0 175
      Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONHTTPClient.h
  89. 0 369
      Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONHTTPClient.m
  90. 0 66
      Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONModel+networking.h
  91. 0 109
      Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONModel+networking.m
  92. 0 102
      Benchmark/Vendor/JSONModel/JSONModelTransformations/JSONKeyMapper.h
  93. 0 237
      Benchmark/Vendor/JSONModel/JSONModelTransformations/JSONKeyMapper.m
  94. 0 230
      Benchmark/Vendor/JSONModel/JSONModelTransformations/JSONValueTransformer.h
  95. 0 274
      Benchmark/Vendor/JSONModel/JSONModelTransformations/JSONValueTransformer.m
  96. 0 34
      Benchmark/Vendor/MJExtension/MJDictionaryCache.h
  97. 0 37
      Benchmark/Vendor/MJExtension/MJDictionaryCache.m
  98. 0 15
      Benchmark/Vendor/MJExtension/MJExtension.h
  99. 0 88
      Benchmark/Vendor/MJExtension/MJExtensionConst.h
  100. 0 27
      Benchmark/Vendor/MJExtension/MJExtensionConst.m

文件差异内容过多而无法显示
+ 214 - 673
Benchmark/ModelBenchmark.xcodeproj/project.pbxproj


+ 10 - 0
Benchmark/ModelBenchmark.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:ModelBenchmark.xcodeproj">
+   </FileRef>
+   <FileRef
+      location = "group:Pods/Pods.xcodeproj">
+   </FileRef>
+</Workspace>

+ 93 - 0
Benchmark/ModelBenchmark/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,93 @@
+{
+  "images" : [
+    {
+      "idiom" : "iphone",
+      "size" : "20x20",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "20x20",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "20x20",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "20x20",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "76x76",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "76x76",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "83.5x83.5",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 27 - 0
Benchmark/ModelBenchmark/Base.lproj/LaunchScreen.storyboard

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
+                        <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="53" y="375"/>
+        </scene>
+    </scenes>
+</document>

+ 0 - 45
Benchmark/ModelBenchmark/Base.lproj/LaunchScreen.xib

@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
-        <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
-    </dependencies>
-    <objects>
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view contentMode="scaleToFill" id="iN0-l3-epB">
-            <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="  Copyright (c) 2015 ibireme. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye" userLabel="Copyright (c) 2015 ibireme. All rights reserved.">
-                    <rect key="frame" x="20" y="439" width="441" height="21"/>
-                    <animations/>
-                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                    <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ModelBenchmark" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
-                    <rect key="frame" x="20" y="140" width="441" height="43"/>
-                    <animations/>
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
-                    <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
-                    <nil key="highlightedColor"/>
-                </label>
-            </subviews>
-            <animations/>
-            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
-            <constraints>
-                <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
-                <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
-                <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
-                <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
-                <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
-                <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
-            </constraints>
-            <nil key="simulatedStatusBarMetrics"/>
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <point key="canvasLocation" x="548" y="455"/>
-        </view>
-    </objects>
-</document>

+ 22 - 19
Benchmark/ModelBenchmark/Base.lproj/Main.storyboard

@@ -1,39 +1,42 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.19" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
     <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.16"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
         <!--View Controller-->
-        <scene sceneID="ufC-wZ-h7g">
+        <scene sceneID="tne-QT-ifu">
             <objects>
-                <viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
+                <viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
                     <layoutGuides>
-                        <viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
-                        <viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
+                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
                     </layoutGuides>
-                    <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
-                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
-                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="See logs in Xcode" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="j5c-ge-kV1">
-                                <rect key="frame" x="232" y="290" width="137" height="21"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="See logs in Xcode" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="13F-4j-upk">
+                                <rect key="frame" x="119" y="323" width="136.5" height="21"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                                <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                         </subviews>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
-                            <constraint firstAttribute="centerY" secondItem="j5c-ge-kV1" secondAttribute="centerY" id="aDc-DL-Lbw"/>
-                            <constraint firstAttribute="centerX" secondItem="j5c-ge-kV1" secondAttribute="centerX" id="nbQ-nb-cHc"/>
+                            <constraint firstItem="13F-4j-upk" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="Dcc-PI-ERC"/>
+                            <constraint firstItem="13F-4j-upk" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="hHC-ce-X17"/>
                         </constraints>
                     </view>
                 </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="409" y="299"/>
+            <point key="canvasLocation" x="140" y="138.98050974512745"/>
         </scene>
     </scenes>
 </document>

+ 0 - 7
Benchmark/ModelBenchmark/Cartfile.bak

@@ -1,7 +0,0 @@
-github "Hearst-DD/ObjectMapper"
-
-github "thoughtbot/Argo"
-github "thoughtbot/Curry"
-
-github "isair/JSONHelper"
-github "ovenbits/ModelRocket"

+ 0 - 9
Benchmark/ModelBenchmark/GithubUserBenchmark.swift.bak

@@ -1,9 +0,0 @@
-import Foundation
-import QuartzCore
-
-@objc class GithubUserBenchmark : NSObject {
-    static func benchmark() {
-        
-        GithubUserObjectMapper.benchmark()
-    }
-}

+ 6 - 6
Benchmark/ModelBenchmark/GitHubUser.h → Benchmark/ModelBenchmark/GithubUserModel/GitHubUser.h

@@ -6,11 +6,11 @@
 //  Copyright (c) 2015 ibireme. All rights reserved.
 //
 
-#import "YYModel.h"
-#import "Mantle.h"
-#import "JSONModelLib.h"
-#import "FastEasyMapping.h"
-#import "MJExtension.h"
+#import <YYModel/YYModel.h>
+#import <Mantle/Mantle.h>
+#import <JSONModel/JSONModelLib.h>
+#import <FastEasyMapping/FastEasyMapping.h>
+#import <MJExtension/MJExtension.h>
 
 // https://api.github.com/users/facebook
 
@@ -226,4 +226,4 @@
 @property (nonatomic, strong) NSDate *createdAt;
 @property (nonatomic, strong) NSDate *updatedAt;
 @property (nonatomic, strong) NSValue *test;
-@end
+@end

+ 19 - 19
Benchmark/ModelBenchmark/GitHubUser.m → Benchmark/ModelBenchmark/GithubUserModel/GitHubUser.m

@@ -152,25 +152,25 @@ SET_NUM(_following, @"following");
 
 @implementation JSGHUser
 + (JSONKeyMapper *)keyMapper {
-    return [[JSONKeyMapper alloc] initWithDictionary:@{
-        @"id" : @"userID",
-        @"avatar_url" : @"avatarURL",
-        @"gravatar_id" : @"gravatarID",
-        @"html_url" : @"htmlURL",
-        @"followers_url" : @"followersURL",
-        @"following_url" : @"followingURL",
-        @"gists_url" : @"gistsURL",
-        @"starred_url" : @"starredURL",
-        @"subscriptions_url" : @"subscriptionsURL",
-        @"organizations_url" : @"organizationsURL",
-        @"repos_url" : @"reposURL",
-        @"events_url" : @"eventsURL",
-        @"received_events_url" : @"receivedEventsURL",
-        @"site_admin" : @"siteAdmin",
-        @"public_repos" : @"publicRepos",
-        @"public_gists" : @"publicGists",
-        @"created_at" : @"createdAt",
-        @"updated_at" : @"updatedAt",
+    return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{
+          @"userID" : @"id",
+          @"avatarURL" : @"avatar_url",
+          @"gravatarID" : @"gravatar_id",
+          @"htmlURL" : @"html_url",
+          @"followersURL" : @"followers_url",
+          @"followingURL" : @"following_url",
+          @"gistsURL" : @"gists_url",
+          @"starredURL" : @"starred_url",
+          @"subscriptionsURL" : @"subscriptions_url",
+          @"organizationsURL" : @"organizations_url",
+          @"reposURL" : @"repos_url",
+          @"eventsURL" : @"events_url",
+          @"receivedEventsURL" : @"received_events_url",
+          @"siteAdmin" : @"site_admin",
+          @"publicRepos" : @"public_repos",
+          @"publicGists" : @"public_gists",
+          @"createdAt" : @"created_at",
+          @"updatedAt" : @"updated_at",
     }];
 }
 + (BOOL)propertyIsOptional:(NSString *)propertyName {

+ 624 - 0
Benchmark/ModelBenchmark/GithubUserModel/SwiftGithubUser.swift

@@ -0,0 +1,624 @@
+//
+//  SwiftGithubUser.swift
+//  ModelBenchmark
+//
+//  Created by ibireme on 2017/8/6.
+//  Copyright © 2017年 ibireme. All rights reserved.
+//
+
+import Foundation
+import QuartzCore
+
+import ObjectMapper
+import HandyJSON
+import SwiftyJSON
+
+
+extension GithubUserObjectMapper {
+    static func benchmark() {
+        
+        var start, end, time: Double
+        var data: Data
+        var json: [String: Any]
+        do {
+            let path = Bundle.main.url(forResource: "user", withExtension: "json")
+            data = try Data(contentsOf: path!);
+            json = try JSONSerialization.jsonObject(with: data, options: .allowFragments) as! [String: Any]
+        } catch let error {
+            print("Decode `user.json` in main bundle failed.")
+            print(error)
+            return
+        }
+        
+        
+        
+        print("Codable(*#):        ", separator: "", terminator: "")
+        
+        let decoder = JSONDecoder()
+        let encoder = JSONEncoder()
+        start = CACurrentMediaTime()
+        for _ in 1...10000 {
+            _ = try! decoder.decode(GithubUserCodable.self, from: data)
+        }
+        end = CACurrentMediaTime()
+        time = (end - start) * 1000.0
+        print(String(format:"%8.2f", time) + "   ", separator: "", terminator: "")
+        
+        
+        let githubUserCodable = try! decoder.decode(GithubUserCodable.self, from: data)
+        start = CACurrentMediaTime()
+        for _ in 1...10000 {
+            _ = try! encoder.encode(githubUserCodable)
+        }
+        end = CACurrentMediaTime()
+        time = (end - start) * 1000.0
+        print(String(format:"%8.2f", time), separator: "", terminator: "")
+        print("")
+        
+        
+        
+        print("ObjectMapper(#):    ", separator: "", terminator: "")
+        start = CACurrentMediaTime()
+        for _ in 1...10000 {
+            _ = GithubUserObjectMapper(JSON: json)
+        }
+        end = CACurrentMediaTime()
+        time = (end - start) * 1000.0
+        print(String(format:"%8.2f", time) + "   ", separator: "", terminator: "")
+        
+        
+        let githubUserObjectMapper = GithubUserObjectMapper(JSON: json)
+        start = CACurrentMediaTime()
+        for _ in 1...10000 {
+            _ = githubUserObjectMapper?.toJSON()
+        }
+        end = CACurrentMediaTime()
+        time = (end - start) * 1000.0
+        print(String(format:"%8.2f", time), separator: "", terminator: "")
+        print("")
+        
+        
+        
+        
+        
+        
+        
+        print("HandyJSON(#):       ", separator: "", terminator: "")
+        start = CACurrentMediaTime()
+        for _ in 1...10000 {
+            _ = GithubUserHandyJSON.deserialize(from: json as NSDictionary)
+        }
+        end = CACurrentMediaTime()
+        time = (end - start) * 1000.0
+        print(String(format:"%8.2f", time) + "   ", separator: "", terminator: "")
+        
+        
+        let githubUserHandyJSON = GithubUserHandyJSON.deserialize(from: json as NSDictionary)
+        start = CACurrentMediaTime()
+        for _ in 1...10000 {
+            _ = githubUserHandyJSON?.toJSON()
+        }
+        end = CACurrentMediaTime()
+        time = (end - start) * 1000.0
+        print(String(format:"%8.2f", time), separator: "", terminator: "")
+        print("")
+        
+        
+        
+        
+        
+        
+        print("SwiftyJSON(#):      ", separator: "", terminator: "")
+        let swiftJson = JSON(data: data)
+        start = CACurrentMediaTime()
+        for _ in 1...10000 {
+            _ = GithubUserSwifty(fromJson: swiftJson)
+        }
+        end = CACurrentMediaTime()
+        time = (end - start) * 1000.0
+        print(String(format:"%8.2f", time) + "   ", separator: "", terminator: "")
+        
+        
+        let githubUserSwifty = GithubUserSwifty(fromJson: swiftJson)
+        start = CACurrentMediaTime()
+        for _ in 1...10000 {
+            _ = githubUserSwifty.toDictionary()
+        }
+        end = CACurrentMediaTime()
+        time = (end - start) * 1000.0
+        print(String(format:"%8.2f", time), separator: "", terminator: "")
+        print("")
+        
+        
+        
+    }
+}
+
+
+// Swift Codable
+struct GithubUserCodable: Codable {
+    var login: String?
+    var userID: UInt64?
+    var avatarURL: String?
+    var gravatarID: String?
+    var url: String?
+    var htmlURL: String?
+    var followersURL: String?
+    var followingURL: String?
+    var gistsURL: String?
+    var starredURL: String?
+    var subscriptionsURL: String?
+    var organizationsURL: String?
+    var reposURL: String?
+    var eventsURL: String?
+    var receivedEventsURL: String?
+    var type: String?
+    var siteAdmin : Bool?
+    var name: String?
+    var company: String?
+    var blog: String?
+    var location: String?
+    var email: String?
+    var hireable: String?
+    var bio: String?
+    var publicRepos: Int?
+    var publicGists: Int?
+    var followers: Int?
+    var following: Int?
+    var createdAt: Date?
+    var updatedAt: Date?
+    
+    enum CodingKeys : String, CodingKey {
+        case login              = "login"
+        case userID             = "id"
+        case avatarURL          = "avatar_url"
+        case gravatarID         = "gravatar_id"
+        case url                = "url"
+        case htmlURL            = "html_url"
+        case followersURL       = "followers_url"
+        case followingURL       = "following_url"
+        case gistsURL           = "gists_url"
+        case starredURL         = "starred_url"
+        case subscriptionsURL   = "subscriptions_url"
+        case organizationsURL   = "organizations_url"
+        case reposURL           = "repos_url"
+        case eventsURL          = "events_url"
+        case receivedEventsURL  = "received_events_url"
+        case type               = "type"
+        case siteAdmin          = "site_admin"
+        case name               = "name"
+        case company            = "company"
+        case blog               = "blog"
+        case location           = "location"
+        case email              = "email"
+        case hireable           = "hireable"
+        case bio                = "bio"
+        case publicRepos        = "public_repos"
+        case publicGists        = "public_gists"
+        case followers          = "followers"
+        case following          = "following"
+        case createdAt          = "created_at"
+        case updatedAt          = "updated_at"
+    }
+}
+
+
+
+
+
+
+
+// ObjectMapper
+class GithubUserObjectMapper : Mappable {
+    var login: String?
+    var userID: UInt64?
+    var avatarURL: String?
+    var gravatarID: String?
+    var url: String?
+    var htmlURL: String?
+    var followersURL: String?
+    var followingURL: String?
+    var gistsURL: String?
+    var starredURL: String?
+    var subscriptionsURL: String?
+    var organizationsURL: String?
+    var reposURL: String?
+    var eventsURL: String?
+    var receivedEventsURL: String?
+    var type: String?
+    var siteAdmin : Bool?
+    var name: String?
+    var company: String?
+    var blog: String?
+    var location: String?
+    var email: String?
+    var hireable: String?
+    var bio: String?
+    var publicRepos: Int?
+    var publicGists: Int?
+    var followers: Int?
+    var following: Int?
+    var createdAt: Date?
+    var updatedAt: Date?
+    var test: NSValue?
+    
+    required init?(map: Map) {
+        
+    }
+    
+    func mapping(map: Map) {
+        login              <- map["login"]
+        userID             <- map["id"]
+        avatarURL          <- map["avatar_url"]
+        gravatarID         <- map["gravatar_id"]
+        url                <- map["url"]
+        htmlURL            <- map["html_url"]
+        followersURL       <- map["followers_url"]
+        followingURL       <- map["following_url"]
+        gistsURL           <- map["gists_url"]
+        starredURL         <- map["starred_url"]
+        subscriptionsURL   <- map["subscriptions_url"]
+        organizationsURL   <- map["organizations_url"]
+        reposURL           <- map["repos_url"]
+        eventsURL          <- map["events_url"]
+        receivedEventsURL  <- map["received_events_url"]
+        type               <- map["type"]
+        siteAdmin          <- map["site_admin"]
+        name               <- map["name"]
+        company            <- map["company"]
+        blog               <- map["blog"]
+        location           <- map["location"]
+        email              <- map["email"]
+        hireable           <- map["hireable"]
+        bio                <- map["bio"]
+        publicRepos        <- map["public_repos"]
+        publicGists        <- map["public_gists"]
+        followers          <- map["followers"]
+        following          <- map["following"]
+        createdAt          <- (map["created_at"], DateTransform())
+        updatedAt          <- (map["updated_at"], DateTransform())
+        test               <- map["test"]
+    }
+    
+}
+
+
+
+
+
+
+// HandyJSON
+class GithubUserHandyJSON: HandyJSON {
+    var login: String?
+    var userID: UInt64?
+    var avatarURL: String?
+    var gravatarID: String?
+    var url: String?
+    var htmlURL: String?
+    var followersURL: String?
+    var followingURL: String?
+    var gistsURL: String?
+    var starredURL: String?
+    var subscriptionsURL: String?
+    var organizationsURL: String?
+    var reposURL: String?
+    var eventsURL: String?
+    var receivedEventsURL: String?
+    var type: String?
+    var siteAdmin : Bool?
+    var name: String?
+    var company: String?
+    var blog: String?
+    var location: String?
+    var email: String?
+    var hireable: String?
+    var bio: String?
+    var publicRepos: Int?
+    var publicGists: Int?
+    var followers: Int?
+    var following: Int?
+    var createdAt: Date?
+    var updatedAt: Date?
+    var test: NSValue?
+    
+    required init() {}
+}
+
+
+// SwiftyJSON
+// Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
+class GithubUserSwifty : NSObject, NSCoding{
+    
+    var avatarUrl : String!
+    var bio : String!
+    var blog : String!
+    var company : String!
+    var email : String!
+    var eventsUrl : String!
+    var followers : Int!
+    var followersUrl : String!
+    var following : Int!
+    var followingUrl : String!
+    var gistsUrl : String!
+    var gravatarId : String!
+    var hireable : String!
+    var htmlUrl : String!
+    var id : Int!
+    var location : String!
+    var login : String!
+    var name : String!
+    var organizationsUrl : String!
+    var publicGists : Int!
+    var publicRepos : Int!
+    var receivedEventsUrl : String!
+    var reposUrl : String!
+    var siteAdmin : Bool!
+    var starredUrl : String!
+    var subscriptionsUrl : String!
+    var type : String!
+    var url : String!
+    
+    
+    /**
+     * Instantiate the instance using the passed json values to set the properties values
+     */
+    init(fromJson json: JSON!){
+        if json.isEmpty{
+            return
+        }
+        avatarUrl = json["avatar_url"].stringValue
+        bio = json["bio"].stringValue
+        blog = json["blog"].stringValue
+        company = json["company"].stringValue
+        email = json["email"].stringValue
+        eventsUrl = json["events_url"].stringValue
+        followers = json["followers"].intValue
+        followersUrl = json["followers_url"].stringValue
+        following = json["following"].intValue
+        followingUrl = json["following_url"].stringValue
+        gistsUrl = json["gists_url"].stringValue
+        gravatarId = json["gravatar_id"].stringValue
+        hireable = json["hireable"].stringValue
+        htmlUrl = json["html_url"].stringValue
+        id = json["id"].intValue
+        location = json["location"].stringValue
+        login = json["login"].stringValue
+        name = json["name"].stringValue
+        organizationsUrl = json["organizations_url"].stringValue
+        publicGists = json["public_gists"].intValue
+        publicRepos = json["public_repos"].intValue
+        receivedEventsUrl = json["received_events_url"].stringValue
+        reposUrl = json["repos_url"].stringValue
+        siteAdmin = json["site_admin"].boolValue
+        starredUrl = json["starred_url"].stringValue
+        subscriptionsUrl = json["subscriptions_url"].stringValue
+        type = json["type"].stringValue
+        url = json["url"].stringValue
+    }
+    
+    /**
+     * Returns all the available property values in the form of [String:Any] object where the key is the approperiate json key and the value is the value of the corresponding property
+     */
+    func toDictionary() -> [String:Any]
+    {
+        var dictionary = [String:Any]()
+        if avatarUrl != nil{
+            dictionary["avatar_url"] = avatarUrl
+        }
+        if bio != nil{
+            dictionary["bio"] = bio
+        }
+        if blog != nil{
+            dictionary["blog"] = blog
+        }
+        if company != nil{
+            dictionary["company"] = company
+        }
+        if email != nil{
+            dictionary["email"] = email
+        }
+        if eventsUrl != nil{
+            dictionary["events_url"] = eventsUrl
+        }
+        if followers != nil{
+            dictionary["followers"] = followers
+        }
+        if followersUrl != nil{
+            dictionary["followers_url"] = followersUrl
+        }
+        if following != nil{
+            dictionary["following"] = following
+        }
+        if followingUrl != nil{
+            dictionary["following_url"] = followingUrl
+        }
+        if gistsUrl != nil{
+            dictionary["gists_url"] = gistsUrl
+        }
+        if gravatarId != nil{
+            dictionary["gravatar_id"] = gravatarId
+        }
+        if hireable != nil{
+            dictionary["hireable"] = hireable
+        }
+        if htmlUrl != nil{
+            dictionary["html_url"] = htmlUrl
+        }
+        if id != nil{
+            dictionary["id"] = id
+        }
+        if location != nil{
+            dictionary["location"] = location
+        }
+        if login != nil{
+            dictionary["login"] = login
+        }
+        if name != nil{
+            dictionary["name"] = name
+        }
+        if organizationsUrl != nil{
+            dictionary["organizations_url"] = organizationsUrl
+        }
+        if publicGists != nil{
+            dictionary["public_gists"] = publicGists
+        }
+        if publicRepos != nil{
+            dictionary["public_repos"] = publicRepos
+        }
+        if receivedEventsUrl != nil{
+            dictionary["received_events_url"] = receivedEventsUrl
+        }
+        if reposUrl != nil{
+            dictionary["repos_url"] = reposUrl
+        }
+        if siteAdmin != nil{
+            dictionary["site_admin"] = siteAdmin
+        }
+        if starredUrl != nil{
+            dictionary["starred_url"] = starredUrl
+        }
+        if subscriptionsUrl != nil{
+            dictionary["subscriptions_url"] = subscriptionsUrl
+        }
+        if type != nil{
+            dictionary["type"] = type
+        }
+        if url != nil{
+            dictionary["url"] = url
+        }
+        return dictionary
+    }
+    
+    /**
+     * NSCoding required initializer.
+     * Fills the data from the passed decoder
+     */
+    @objc required init(coder aDecoder: NSCoder)
+    {
+        avatarUrl = aDecoder.decodeObject(forKey: "avatar_url") as? String
+        bio = aDecoder.decodeObject(forKey: "bio") as? String
+        blog = aDecoder.decodeObject(forKey: "blog") as? String
+        company = aDecoder.decodeObject(forKey: "company") as? String
+        email = aDecoder.decodeObject(forKey: "email") as? String
+        eventsUrl = aDecoder.decodeObject(forKey: "events_url") as? String
+        followers = aDecoder.decodeObject(forKey: "followers") as? Int
+        followersUrl = aDecoder.decodeObject(forKey: "followers_url") as? String
+        following = aDecoder.decodeObject(forKey: "following") as? Int
+        followingUrl = aDecoder.decodeObject(forKey: "following_url") as? String
+        gistsUrl = aDecoder.decodeObject(forKey: "gists_url") as? String
+        gravatarId = aDecoder.decodeObject(forKey: "gravatar_id") as? String
+        hireable = aDecoder.decodeObject(forKey: "hireable") as? String
+        htmlUrl = aDecoder.decodeObject(forKey: "html_url") as? String
+        id = aDecoder.decodeObject(forKey: "id") as? Int
+        location = aDecoder.decodeObject(forKey: "location") as? String
+        login = aDecoder.decodeObject(forKey: "login") as? String
+        name = aDecoder.decodeObject(forKey: "name") as? String
+        organizationsUrl = aDecoder.decodeObject(forKey: "organizations_url") as? String
+        publicGists = aDecoder.decodeObject(forKey: "public_gists") as? Int
+        publicRepos = aDecoder.decodeObject(forKey: "public_repos") as? Int
+        receivedEventsUrl = aDecoder.decodeObject(forKey: "received_events_url") as? String
+        reposUrl = aDecoder.decodeObject(forKey: "repos_url") as? String
+        siteAdmin = aDecoder.decodeObject(forKey: "site_admin") as? Bool
+        starredUrl = aDecoder.decodeObject(forKey: "starred_url") as? String
+        subscriptionsUrl = aDecoder.decodeObject(forKey: "subscriptions_url") as? String
+        type = aDecoder.decodeObject(forKey: "type") as? String
+        url = aDecoder.decodeObject(forKey: "url") as? String
+        
+    }
+    
+    /**
+     * NSCoding required method.
+     * Encodes mode properties into the decoder
+     */
+    func encode(with aCoder: NSCoder)
+    {
+        if avatarUrl != nil{
+            aCoder.encode(avatarUrl, forKey: "avatar_url")
+        }
+        if bio != nil{
+            aCoder.encode(bio, forKey: "bio")
+        }
+        if blog != nil{
+            aCoder.encode(blog, forKey: "blog")
+        }
+        if company != nil{
+            aCoder.encode(company, forKey: "company")
+        }
+        if email != nil{
+            aCoder.encode(email, forKey: "email")
+        }
+        if eventsUrl != nil{
+            aCoder.encode(eventsUrl, forKey: "events_url")
+        }
+        if followers != nil{
+            aCoder.encode(followers, forKey: "followers")
+        }
+        if followersUrl != nil{
+            aCoder.encode(followersUrl, forKey: "followers_url")
+        }
+        if following != nil{
+            aCoder.encode(following, forKey: "following")
+        }
+        if followingUrl != nil{
+            aCoder.encode(followingUrl, forKey: "following_url")
+        }
+        if gistsUrl != nil{
+            aCoder.encode(gistsUrl, forKey: "gists_url")
+        }
+        if gravatarId != nil{
+            aCoder.encode(gravatarId, forKey: "gravatar_id")
+        }
+        if hireable != nil{
+            aCoder.encode(hireable, forKey: "hireable")
+        }
+        if htmlUrl != nil{
+            aCoder.encode(htmlUrl, forKey: "html_url")
+        }
+        if id != nil{
+            aCoder.encode(id, forKey: "id")
+        }
+        if location != nil{
+            aCoder.encode(location, forKey: "location")
+        }
+        if login != nil{
+            aCoder.encode(login, forKey: "login")
+        }
+        if name != nil{
+            aCoder.encode(name, forKey: "name")
+        }
+        if organizationsUrl != nil{
+            aCoder.encode(organizationsUrl, forKey: "organizations_url")
+        }
+        if publicGists != nil{
+            aCoder.encode(publicGists, forKey: "public_gists")
+        }
+        if publicRepos != nil{
+            aCoder.encode(publicRepos, forKey: "public_repos")
+        }
+        if receivedEventsUrl != nil{
+            aCoder.encode(receivedEventsUrl, forKey: "received_events_url")
+        }
+        if reposUrl != nil{
+            aCoder.encode(reposUrl, forKey: "repos_url")
+        }
+        if siteAdmin != nil{
+            aCoder.encode(siteAdmin, forKey: "site_admin")
+        }
+        if starredUrl != nil{
+            aCoder.encode(starredUrl, forKey: "starred_url")
+        }
+        if subscriptionsUrl != nil{
+            aCoder.encode(subscriptionsUrl, forKey: "subscriptions_url")
+        }
+        if type != nil{
+            aCoder.encode(type, forKey: "type")
+        }
+        if url != nil{
+            aCoder.encode(url, forKey: "url")
+        }
+        
+    }
+    
+}
+
+

+ 0 - 0
Benchmark/ModelBenchmark/user.json → Benchmark/ModelBenchmark/GithubUserModel/user.json


+ 0 - 99
Benchmark/ModelBenchmark/GithubUserObjectMapper.swift.bak

@@ -1,99 +0,0 @@
-import Foundation
-import QuartzCore
-import ObjectMapper
-
-extension GithubUserObjectMapper {
-    static func benchmark() {
-        let path = NSBundle.mainBundle().pathForResource("user", ofType:"json")
-        let data = NSData(contentsOfFile: path!)
-        let json: NSDictionary?
-        do {
-            json = try NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.AllowFragments) as? NSDictionary
-        } catch let error {
-            print(error)
-            json = nil
-        }
-        
-        print("ObjectMapper        from json    to json    archive")
-        let start = CACurrentMediaTime()
-        for _ in 1...10000 {
-            _ = Mapper<GithubUserObjectMapper>().map(json)
-        }
-        let end = CACurrentMediaTime()
-        let time = (end - start) * 1000.0
-        print("\(time) ms") // too slow...
-    }
-}
-
-class GithubUserObjectMapper : Mappable {
-    var login: String?
-    var userID: UInt64?
-    var avatarURL: String?
-    var gravatarID: String?
-    var url: String?
-    var htmlURL: String?
-    var followersURL: String?
-    var followingURL: String?
-    var gistsURL: String?
-    var starredURL: String?
-    var subscriptionsURL: String?
-    var organizationsURL: String?
-    var reposURL: String?
-    var eventsURL: String?
-    var receivedEventsURL: String?
-    var type: String?
-    var siteAdmin : Bool?
-    var name: String?
-    var company: String?
-    var blog: String?
-    var location: String?
-    var email: String?
-    var hireable: String?
-    var bio: String?
-    var publicRepos: Int?
-    var publicGists: Int?
-    var followers: Int?
-    var following: Int?
-    var createdAt: NSDate?
-    var updatedAt: NSDate?
-    var test: NSValue?
-    
-    required init?(_ map: Map){
-        
-    }
-    
-    func mapping(map: Map) {
-        login              <- map["login"]
-        userID             <- map["id"]
-        avatarURL          <- map["avatar_url"]
-        gravatarID         <- map["gravatar_id"]
-        url                <- map["url"]
-        htmlURL            <- map["html_url"]
-        followersURL       <- map["followers_url"]
-        followingURL       <- map["following_url"]
-        gistsURL           <- map["gists_url"]
-        starredURL         <- map["starred_url"]
-        subscriptionsURL   <- map["subscriptions_url"]
-        organizationsURL   <- map["organizations_url"]
-        reposURL           <- map["repos_url"]
-        eventsURL          <- map["events_url"]
-        receivedEventsURL  <- map["received_events_url"]
-        type               <- map["type"]
-        siteAdmin          <- map["site_admin"]
-        name               <- map["name"]
-        company            <- map["company"]
-        blog               <- map["blog"]
-        location           <- map["location"]
-        email              <- map["email"]
-        hireable           <- map["hireable"]
-        bio                <- map["bio"]
-        publicRepos        <- map["public_repos"]
-        publicGists        <- map["public_gists"]
-        followers          <- map["followers"]
-        following          <- map["following"]
-        createdAt          <- (map["created_at"], DateTransform())
-        updatedAt          <- map["updated_at"]
-        test               <- map["test"]
-    }
-    
-}

+ 0 - 38
Benchmark/ModelBenchmark/Images.xcassets/AppIcon.appiconset/Contents.json

@@ -1,38 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "iphone",
-      "size" : "29x29",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "iphone",
-      "size" : "29x29",
-      "scale" : "3x"
-    },
-    {
-      "idiom" : "iphone",
-      "size" : "40x40",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "iphone",
-      "size" : "40x40",
-      "scale" : "3x"
-    },
-    {
-      "idiom" : "iphone",
-      "size" : "60x60",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "iphone",
-      "size" : "60x60",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 10 - 14
Benchmark/ModelBenchmark/Info.plist

@@ -3,32 +3,19 @@
 <plist version="1.0">
 <dict>
 	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
 	<key>CFBundleExecutable</key>
 	<string>$(EXECUTABLE_NAME)</string>
 	<key>CFBundleIdentifier</key>
 	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
-	<key>CFBundleLocalizations</key>
-	<array>
-		<string>en</string>
-		<string>zh</string>
-		<string>zh_TW</string>
-		<string>fr</string>
-		<string>de</string>
-		<string>it</string>
-		<string>ja</string>
-		<string>ko</string>
-	</array>
 	<key>CFBundleName</key>
 	<string>$(PRODUCT_NAME)</string>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
 	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
 	<key>CFBundleVersion</key>
 	<string>1</string>
 	<key>LSRequiresIPhoneOS</key>
@@ -44,6 +31,15 @@
 	<key>UISupportedInterfaceOrientations</key>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
 	</array>
 </dict>
 </plist>

+ 0 - 158
Benchmark/ModelBenchmark/JSWeiboModel.m

@@ -1,158 +0,0 @@
-//
-//  JSWeiboModel.m
-//  ModelBenchmark
-//
-//  Created by ibireme on 15/9/18.
-//  Copyright (c) 2015 ibireme. All rights reserved.
-//
-
-#import "JSWeiboModel.h"
-#import "DateFormatter.h"
-
-@implementation JSWeiboPictureMetadata
-+ (JSONKeyMapper *)keyMapper {
-    return [[JSONKeyMapper alloc] initWithDictionary:@{ @"cut_type" : @"cutType" }];
-}
-+(BOOL)propertyIsOptional:(NSString*)propertyName {
-    return YES;
-}
-@end
-
-@implementation JSWeiboPicture
-+ (JSONKeyMapper *)keyMapper {
-    return [[JSONKeyMapper alloc] initWithDictionary:@{
-        @"pic_id" : @"picID",
-        @"keep_size" : @"keepSize",
-        @"photo_tag" : @"photoTag",
-        @"object_id" : @"objectID",
-        @"middleplus" : @"middlePlus"
-    }];
-}
-+(BOOL)propertyIsOptional:(NSString*)propertyName {
-    return YES;
-}
-@end
-
-@implementation JSWeiboURL
-+ (JSONKeyMapper *)keyMapper {
-    return [[JSONKeyMapper alloc] initWithDictionary:@{
-        @"ori_url" : @"oriURL",
-        @"url_title" : @"urlTitle",
-        @"url_type_pic" : @"urlTypePic",
-        @"url_type" : @"urlType",
-        @"short_url" : @"shortURL",
-        @"actionlog" : @"actionLog",
-        @"page_id" : @"pageID",
-        @"storage_type" : @"storageType"
-    }];
-}
-+(BOOL)propertyIsOptional:(NSString*)propertyName {
-    return YES;
-}
-@end
-
-@implementation JSWeiboUser
-+ (JSONKeyMapper *)keyMapper {
-    return [[JSONKeyMapper alloc] initWithDictionary:@{
-             @"id" : @"userID",
-             @"idstr" : @"idString",
-             @"gender" : @"genderString",
-             @"bi_followers_count" : @"biFollowersCount",
-             @"profile_image_url" : @"profileImageURL",
-             @"class" : @"uclass",
-             @"verified_contact_email" : @"verifiedContactEmail",
-             @"statuses_count" : @"statusesCount",
-             @"geo_enabled" : @"geoEnabled",
-             @"follow_me" : @"followMe",
-             @"cover_image_phone" : @"coverImagePhone",
-             @"description" : @"desc",
-             @"followers_count" : @"followersCount",
-             @"verified_contact_mobile" : @"verifiedContactMobile",
-             @"avatar_large" : @"avatarLarge",
-             @"verified_trade" : @"verifiedTrade",
-             @"profile_url" : @"profileURL",
-             @"cover_image" : @"coverImage",
-             @"online_status"  : @"onlineStatus",
-             @"badge_top" : @"badgeTop",
-             @"verified_contact_name" : @"verifiedContactName",
-             @"screen_name" : @"screenName",
-             @"verified_source_url" : @"verifiedSourceURL",
-             @"pagefriends_count" : @"pagefriendsCount",
-             @"vverified_reason" : @"erifiedReason",
-             @"friends_count" : @"friendsCount",
-             @"block_app" : @"blockApp",
-             @"has_ability_tag" : @"hasAbilityTag",
-             @"avatar_hd" : @"avatarHD",
-             @"credit_score" : @"creditScore",
-             @"created_at" : @"createdAt",
-             @"block_word" : @"blockWord",
-             @"allow_all_act_msg" : @"allowAllActMsg",
-             @"verified_state" : @"verifiedState",
-             @"verified_reason_modified" : @"verifiedReasonModified",
-             @"allow_all_comment" : @"allowAllComment",
-             @"verified_level" : @"verifiedLevel",
-             @"verified_reason_url" : @"verifiedReasonURL",
-             @"favourites_count" : @"favouritesCount",
-             @"verified_type" : @"verifiedType",
-             @"verified_source" : @"verifiedSource",
-             @"user_ability" : @"userAbility"}];
-}
-+(BOOL)propertyIsOptional:(NSString*)propertyName {
-    return YES;
-}
-@end
-
-@implementation JSWeiboStatus
-+ (JSONKeyMapper *)keyMapper {
-    return [[JSONKeyMapper alloc] initWithDictionary:@{
-        @"id" : @"statusID",
-        @"created_at" : @"createdAt",
-        @"attitudes_status" : @"attitudesStatus",
-        @"in_reply_to_screen_name" : @"inReplyToScreenName",
-        @"source_type" : @"sourceType",
-        @"comments_count" : @"commentsCount",
-        @"recom_state" : @"recomState",
-        @"source_allowclick" : @"sourceAllowClick",
-        @"biz_feature" : @"bizFeature",
-        @"mblogtypename" : @"mblogTypeName",
-        @"url_struct" : @"urlStruct",
-        @"mblogtype" : @"mblogType",
-        @"in_reply_to_status_id" : @"inReplyToStatusId",
-        @"pic_ids" : @"picIds",
-        @"reposts_count" : @"repostsCount",
-        @"attitudes_count" : @"attitudesCount",
-        @"darwin_tags" : @"darwinTags",
-        @"userType" : @"userType",
-        @"pic_infos" : @"picInfos",
-        @"in_reply_to_user_id" : @"inReplyToUserId"
-    }];
-}
-+(BOOL)propertyIsOptional:(NSString*)propertyName {
-    return YES;
-}
-@end
-
-
-
-
-
-/**
- JSONModel use a global transformer to transform value...
- But how to create a custom transformer for a specified model ?!!!!
- */
-@interface JSONValueTransformer(CustomDate)
--(NSDate*)__NSDateFromNSString:(NSString*)string;
-@end
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wincomplete-implementation"
-@implementation JSONValueTransformer (CustomDate)
-- (NSDate *)NSDateFromNSString:(NSString *)string {
-    if (string.length == 30) {
-        return [[DateFormatter weiboDataFormatter] dateFromString:string];
-    } else {
-        return [self __NSDateFromNSString:string];
-    }
-}
-@end
-#pragma clang diagnostic pop

+ 16 - 0
Benchmark/ModelBenchmark/SwiftModel.swift

@@ -0,0 +1,16 @@
+//
+//  File.swift
+//  ModelBenchmark
+//
+//  Created by ibireme on 2017/8/6.
+//  Copyright © 2017年 ibireme. All rights reserved.
+//
+
+import Foundation
+
+@objc class GithubUserBenchmark : NSObject {
+    @objc static public func benchmark() {
+        
+        GithubUserObjectMapper.benchmark()
+    }
+}

+ 50 - 22
Benchmark/ModelBenchmark/ViewController.m

@@ -15,16 +15,8 @@
 #import "MTWeiboModel.h"
 #import "JSWeiboModel.h"
 #import "MJWeiboModel.h"
-//#import "ModelBenchmark-Swift.h"
+#import "ModelBenchmark-Swift.h"
 
-/*
- Benchmark: (update to 2016-01-15)
- YYModel: https://github.com/ibireme/YYKit
- Mantle: https://github.com/Mantle/Mantle
- JSONModel: https://github.com/icanzilb/JSONModel
- FastEasyMapping: https://github.com/Yalantis/FastEasyMapping
- MJExtension: https://github.com/CoderMJLee/MJExtension
- */
 @implementation ViewController
 
 - (void)viewDidLoad {
@@ -44,13 +36,10 @@
 
 - (void)benchmarkGithubUser {
     
-    /// Benchmark swift .. too slow...
-    /// [GithubUserBenchmark benchmark];
-    
     
     printf("----------------------\n");
     printf("Benchmark (10000 times):\n");
-    printf("GHUser          from json    to json    archive\n");
+    printf("GHUser             from json    to json    archive\n");
 
     /// get json data
     NSString *path = [[NSBundle mainBundle] pathForResource:@"user" ofType:@"json"];
@@ -93,6 +82,35 @@
     }
     [holder removeAllObjects];
     
+    
+    
+    /*------------------- JSON Serialization -------------------*/
+    {
+        [holder removeAllObjects];
+        begin = CACurrentMediaTime();
+        @autoreleasepool {
+            for (int i = 0; i < count; i++) {
+                NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
+                [holder addObject:json];
+            }
+        }
+        end = CACurrentMediaTime();
+        printf("JSON(*):            %8.2f   ", (end - begin) * 1000);
+        
+        [holder removeAllObjects];
+        begin = CACurrentMediaTime();
+        @autoreleasepool {
+            for (int i = 0; i < count; i++) {
+                NSData *data = [NSJSONSerialization dataWithJSONObject:json options:kNilOptions error:nil];
+                [holder addObject:json];
+            }
+        }
+        end = CACurrentMediaTime();
+        printf("%8.2f   \n", (end - begin) * 1000);
+    }
+    
+    
+    
     /*------------------- Manually -------------------*/
     {
         [holder removeAllObjects];
@@ -104,7 +122,7 @@
             }
         }
         end = CACurrentMediaTime();
-        printf("Manually:        %8.2f   ", (end - begin) * 1000);
+        printf("Manually(#):        %8.2f   ", (end - begin) * 1000);
         
         
         GHUser *user = [[GHUser alloc] initWithJSONDictionary:json];
@@ -151,7 +169,7 @@
             }
         }
         end = CACurrentMediaTime();
-        printf("YYModel:         %8.2f   ", (end - begin) * 1000);
+        printf("YYModel(#):         %8.2f   ", (end - begin) * 1000);
         
         
         YYGHUser *user = [YYGHUser yy_modelWithJSON:json];
@@ -200,7 +218,7 @@
             }
         }
         end = CACurrentMediaTime();
-        printf("FastEasyMapping: %8.2f   ", (end - begin) * 1000);
+        printf("FastEasyMapping(#): %8.2f   ", (end - begin) * 1000);
         
         
         FEGHUser *user = [FEGHUser new];
@@ -230,19 +248,20 @@
 
     /*------------------- JSONModel -------------------*/
     {
+        NSError *jsErr = nil;
         [holder removeAllObjects];
         begin = CACurrentMediaTime();
         @autoreleasepool {
             for (int i = 0; i < count; i++) {
-                JSGHUser *user = [[JSGHUser alloc] initWithDictionary:json error:nil];
+                JSGHUser *user = [[JSGHUser alloc] initWithDictionary:json error:&jsErr];
                 [user class];
             }
         }
         end = CACurrentMediaTime();
-        printf("JSONModel:       %8.2f   ", (end - begin) * 1000);
+        printf("JSONModel(#):       %8.2f   ", (end - begin) * 1000);
         
         
-        JSGHUser *user = [[JSGHUser alloc] initWithDictionary:json error:nil];
+        JSGHUser *user = [[JSGHUser alloc] initWithDictionary:json error:&jsErr];
         if (user.userID == 0) NSLog(@"error!");
         if (!user.login) NSLog(@"error!");
         if (!user.htmlURL) NSLog(@"error");
@@ -285,7 +304,7 @@
             }
         }
         end = CACurrentMediaTime();
-        printf("Mantle:          %8.2f   ", (end - begin) * 1000);
+        printf("Mantle(#):          %8.2f   ", (end - begin) * 1000);
         
         
         MTGHUser *user = [adapter modelFromJSONDictionary:json error:nil];
@@ -332,7 +351,7 @@
             }
         }
         end = CACurrentMediaTime();
-        printf("MJExtension:     %8.2f   ", (end - begin) * 1000);
+        printf("MJExtension(#):     %8.2f   ", (end - begin) * 1000);
         
         
         MJGHUser *user = [MJGHUser mj_objectWithKeyValues:json];
@@ -367,6 +386,14 @@
         printf("%8.2f\n", (end - begin) * 1000);
     }
     
+    
+    
+    
+    /// Benchmark swift
+    [GithubUserBenchmark benchmark];
+    
+    
+    
     printf("----------------------\n");
     printf("\n");
 }
@@ -817,7 +844,8 @@
         
         @try {
             // JSONModel
-            JSGHUser *jsUser = [[JSGHUser alloc] initWithDictionary:json error:nil];
+            NSError *err = nil;
+            JSGHUser *jsUser = [[JSGHUser alloc] initWithDictionary:json error:&err];
             logError(@"JSONModel:      ", jsUser);
         }
         @catch (NSException *exception) {

+ 0 - 0
Benchmark/ModelBenchmark/DateFormatter.h → Benchmark/ModelBenchmark/WeiboModel/DateFormatter.h


+ 0 - 0
Benchmark/ModelBenchmark/DateFormatter.m → Benchmark/ModelBenchmark/WeiboModel/DateFormatter.m


+ 0 - 0
Benchmark/ModelBenchmark/FEWeiboModel.h → Benchmark/ModelBenchmark/WeiboModel/FEWeiboModel.h


+ 0 - 0
Benchmark/ModelBenchmark/FEWeiboModel.m → Benchmark/ModelBenchmark/WeiboModel/FEWeiboModel.m


+ 0 - 0
Benchmark/ModelBenchmark/JSWeiboModel.h → Benchmark/ModelBenchmark/WeiboModel/JSWeiboModel.h


+ 158 - 0
Benchmark/ModelBenchmark/WeiboModel/JSWeiboModel.m

@@ -0,0 +1,158 @@
+//
+//  JSWeiboModel.m
+//  ModelBenchmark
+//
+//  Created by ibireme on 15/9/18.
+//  Copyright (c) 2015 ibireme. All rights reserved.
+//
+
+#import "JSWeiboModel.h"
+#import "DateFormatter.h"
+
+@implementation JSWeiboPictureMetadata
++ (JSONKeyMapper *)keyMapper {
+    return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"cut_type" : @"cutType" }];
+}
++(BOOL)propertyIsOptional:(NSString*)propertyName {
+    return YES;
+}
+@end
+
+@implementation JSWeiboPicture
++ (JSONKeyMapper *)keyMapper {
+    return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{
+             @"url" : @"url",
+             @"width" : @"width",
+             @"height" : @"height",
+             @"type" : @"type",
+             @"cutType" : @"cut_type"
+    }];
+}
++(BOOL)propertyIsOptional:(NSString*)propertyName {
+    return YES;
+}
+@end
+
+@implementation JSWeiboURL
++ (JSONKeyMapper *)keyMapper {
+    return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{
+             @"oriURL" : @"ori_url",
+             @"urlTitle" : @"url_title",
+             @"urlTypePic" : @"url_type_pic",
+             @"urlType" : @"url_type",
+             @"shortURL" : @"short_url",
+             @"actionLog" : @"actionlog",
+             @"pageID" : @"page_id",
+             @"storageType" : @"storage_type"
+    }];
+}
++(BOOL)propertyIsOptional:(NSString*)propertyName {
+    return YES;
+}
+@end
+
+@implementation JSWeiboUser
++ (JSONKeyMapper *)keyMapper {
+    return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{
+             @"userID" : @"id",
+             @"idString" : @"idstr",
+             @"genderString" : @"gender",
+             @"biFollowersCount" : @"bi_followers_count",
+             @"profileImageURL" : @"profile_image_url",
+             @"uclass" : @"class",
+             @"verifiedContactEmail" : @"verified_contact_email",
+             @"statusesCount" : @"statuses_count",
+             @"geoEnabled" : @"geo_enabled",
+             @"followMe" : @"follow_me",
+             @"coverImagePhone" : @"cover_image_phone",
+             @"desc" : @"description",
+             @"followersCount" : @"followers_count",
+             @"verifiedContactMobile" : @"verified_contact_mobile",
+             @"avatarLarge" : @"avatar_large",
+             @"verifiedTrade" : @"verified_trade",
+             @"profileURL" : @"profile_url",
+             @"coverImage" : @"cover_image",
+             @"onlineStatus"  : @"online_status",
+             @"badgeTop" : @"badge_top",
+             @"verifiedContactName" : @"verified_contact_name",
+             @"screenName" : @"screen_name",
+             @"verifiedSourceURL" : @"verified_source_url",
+             @"pagefriendsCount" : @"pagefriends_count",
+             @"verifiedReason" : @"verified_reason",
+             @"friendsCount" : @"friends_count",
+             @"blockApp" : @"block_app",
+             @"hasAbilityTag" : @"has_ability_tag",
+             @"avatarHD" : @"avatar_hd",
+             @"creditScore" : @"credit_score",
+             @"createdAt" : @"created_at",
+             @"blockWord" : @"block_word",
+             @"allowAllActMsg" : @"allow_all_act_msg",
+             @"verifiedState" : @"verified_state",
+             @"verifiedReasonModified" : @"verified_reason_modified",
+             @"allowAllComment" : @"allow_all_comment",
+             @"verifiedLevel" : @"verified_level",
+             @"verifiedReasonURL" : @"verified_reason_url",
+             @"favouritesCount" : @"favourites_count",
+             @"verifiedType" : @"verified_type",
+             @"verifiedSource" : @"verified_source",
+             @"userAbility" : @"user_ability"}];
+}
++(BOOL)propertyIsOptional:(NSString*)propertyName {
+    return YES;
+}
+@end
+
+@implementation JSWeiboStatus
++ (JSONKeyMapper *)keyMapper {
+    return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{
+         @"statusID" : @"id",
+         @"createdAt" : @"created_at",
+         @"attitudesStatus" : @"attitudes_status",
+         @"inReplyToScreenName" : @"in_reply_to_screen_name",
+         @"sourceType" : @"source_type",
+         @"commentsCount" : @"comments_count",
+         @"urlStruct" : @"url_struct",
+         @"recomState" : @"recom_state",
+         @"sourceAllowClick" : @"source_allowclick",
+         @"bizFeature" : @"biz_feature",
+         @"mblogTypeName" : @"mblogtypename",
+         @"mblogType" : @"mblogtype",
+         @"inReplyToStatusId" : @"in_reply_to_status_id",
+         @"picIds" : @"pic_ids",
+         @"repostsCount" : @"reposts_count",
+         @"attitudesCount" : @"attitudes_count",
+         @"darwinTags" : @"darwin_tags",
+         @"userType" : @"userType",
+         @"picInfos" : @"pic_infos",
+         @"inReplyToUserId" : @"in_reply_to_user_id"
+    }];
+}
++(BOOL)propertyIsOptional:(NSString*)propertyName {
+    return YES;
+}
+@end
+
+
+
+
+
+/**
+ JSONModel use a global transformer to transform value...
+ But how to create a custom transformer for a specified model ?!!!!
+ */
+@interface JSONValueTransformer(CustomDate)
+-(NSDate*)__NSDateFromNSString:(NSString*)string;
+@end
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wincomplete-implementation"
+@implementation JSONValueTransformer (CustomDate)
+- (NSDate *)NSDateFromNSString:(NSString *)string {
+    if (string.length == 30) {
+        return [[DateFormatter weiboDataFormatter] dateFromString:string];
+    } else {
+        return [self __NSDateFromNSString:string];
+    }
+}
+@end
+#pragma clang diagnostic pop

+ 0 - 0
Benchmark/ModelBenchmark/MJWeiboModel.h → Benchmark/ModelBenchmark/WeiboModel/MJWeiboModel.h


+ 0 - 0
Benchmark/ModelBenchmark/MJWeiboModel.m → Benchmark/ModelBenchmark/WeiboModel/MJWeiboModel.m


+ 0 - 0
Benchmark/ModelBenchmark/MTWeiboModel.h → Benchmark/ModelBenchmark/WeiboModel/MTWeiboModel.h


+ 0 - 0
Benchmark/ModelBenchmark/MTWeiboModel.m → Benchmark/ModelBenchmark/WeiboModel/MTWeiboModel.m


+ 1 - 1
Benchmark/ModelBenchmark/YYWeiboModel.h → Benchmark/ModelBenchmark/WeiboModel/YYWeiboModel.h

@@ -6,7 +6,7 @@
 //  Copyright (c) 2015 ibireme. All rights reserved.
 //
 
-#import "YYModel.h"
+#import <YYModel/YYModel.h>
 
 @interface YYWeiboPictureMetadata : NSObject <NSCoding, NSCopying>
 @property (nonatomic, strong) NSString *url;

+ 0 - 0
Benchmark/ModelBenchmark/YYWeiboModel.m → Benchmark/ModelBenchmark/WeiboModel/YYWeiboModel.m


+ 0 - 0
Benchmark/ModelBenchmark/weibo.json → Benchmark/ModelBenchmark/WeiboModel/weibo.json


+ 27 - 0
Benchmark/Podfile

@@ -0,0 +1,27 @@
+platform :ios, '8.0'
+use_frameworks!
+
+target 'ModelBenchmark' do
+
+# Objective-C
+pod 'FastEasyMapping'
+pod 'JSONModel'
+pod 'Mantle'
+pod 'MJExtension'
+pod 'YYModel'
+
+# Swift
+pod 'Argo'
+pod 'Gloss'
+pod 'HandyJSON'
+pod 'ObjectMapper'
+pod 'SwiftyJSON'
+
+# Generator
+# https://github.com/Ahmed-Ali/JSONExport
+# https://github.com/nixzhu/Coolie
+# https://github.com/johnlui/JSONNeverDie
+
+end
+
+

+ 0 - 15
Benchmark/Vendor/FastEasyMapping/Core/Assignment Policy/FEMAssignmentPolicy.h

@@ -1,15 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-
-@class FEMRelationshipAssignmentContext;
-
-typedef __nullable id (^FEMAssignmentPolicy)(FEMRelationshipAssignmentContext * __nonnull context);
-
-OBJC_EXTERN __nonnull FEMAssignmentPolicy FEMAssignmentPolicyAssign;
-
-OBJC_EXTERN __nonnull FEMAssignmentPolicy FEMAssignmentPolicyObjectMerge;
-OBJC_EXTERN __nonnull FEMAssignmentPolicy FEMAssignmentPolicyCollectionMerge;
-
-OBJC_EXTERN __nonnull FEMAssignmentPolicy FEMAssignmentPolicyObjectReplace;
-OBJC_EXTERN __nonnull FEMAssignmentPolicy FEMAssignmentPolicyCollectionReplace;

+ 0 - 60
Benchmark/Vendor/FastEasyMapping/Core/Assignment Policy/FEMAssignmentPolicy.m

@@ -1,60 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMAssignmentPolicy.h"
-
-#import "FEMRelationshipAssignmentContext.h"
-#import "FEMExcludableCollection.h"
-#import "FEMMergeableCollection.h"
-
-FEMAssignmentPolicy FEMAssignmentPolicyAssign = ^id(FEMRelationshipAssignmentContext * context) {
-    return context.targetRelationshipValue;
-};
-
-FEMAssignmentPolicy FEMAssignmentPolicyObjectMerge = ^id(FEMRelationshipAssignmentContext *context) {
-    return context.targetRelationshipValue ?: context.sourceRelationshipValue;
-};
-
-FEMAssignmentPolicy FEMAssignmentPolicyCollectionMerge = ^id(FEMRelationshipAssignmentContext *context) {
-    if (!context.targetRelationshipValue) return context.sourceRelationshipValue;
-
-    NSCAssert(
-        [context.targetRelationshipValue conformsToProtocol:@protocol(FEMMergeableCollection)],
-        @"Collection %@ should support protocol %@",
-        NSStringFromClass([context.targetRelationshipValue class]),
-        NSStringFromProtocol(@protocol(FEMMergeableCollection))
-    );
-
-    return [context.targetRelationshipValue collectionByMergingObjects:context.sourceRelationshipValue];
-};
-
-FEMAssignmentPolicy FEMAssignmentPolicyObjectReplace = ^id(FEMRelationshipAssignmentContext *context) {
-    if (context.sourceRelationshipValue && ![context.sourceRelationshipValue isEqual:context.targetRelationshipValue]) {
-        [context deleteRelationshipObject:context.sourceRelationshipValue];
-    }
-
-    return context.targetRelationshipValue;
-};
-
-FEMAssignmentPolicy FEMAssignmentPolicyCollectionReplace = ^id(FEMRelationshipAssignmentContext *context) {
-    if (!context.sourceRelationshipValue) return context.targetRelationshipValue;
-
-    if (context.targetRelationshipValue) {
-        NSCAssert(
-            [context.sourceRelationshipValue conformsToProtocol:@protocol(FEMExcludableCollection)],
-            @"Collection %@ should support protocol %@",
-            NSStringFromClass([context.targetRelationshipValue class]),
-            NSStringFromProtocol(@protocol(FEMExcludableCollection))
-        );
-
-        id objectsToDelete = [(id <FEMExcludableCollection>) context.sourceRelationshipValue collectionByExcludingObjects:context.targetRelationshipValue];
-        for (id object in objectsToDelete) {
-            [context deleteRelationshipObject:object];
-        }
-    } else {
-        for (id object in context.sourceRelationshipValue) {
-            [context deleteRelationshipObject:object];
-        }
-    }
-
-    return context.targetRelationshipValue;
-};

+ 0 - 18
Benchmark/Vendor/FastEasyMapping/Core/Assignment Policy/FEMRelationshipAssignmentContext+Internal.h

@@ -1,18 +0,0 @@
-//
-// Created by zen on 13/05/15.
-// Copyright (c) 2015 Yalantis. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-#import "FEMRelationshipAssignmentContext.h"
-
-@interface FEMRelationshipAssignmentContext (Internal)
-
-@property (nonatomic, strong) id destinationObject;
-@property (nonatomic, strong) FEMRelationship *relationship;
-
-@property (nonatomic, strong) id sourceRelationshipValue;
-@property (nonatomic, strong) id targetRelationshipValue;
-
-@end

+ 0 - 31
Benchmark/Vendor/FastEasyMapping/Core/Assignment Policy/FEMRelationshipAssignmentContext.h

@@ -1,31 +0,0 @@
-//
-// Created by zen on 13/05/15.
-// Copyright (c) 2015 Yalantis. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@class FEMRelationship, FEMObjectStore, FEMRelationshipAssignmentContext;
-
-@protocol FEMRelationshipAssignmentContextDelegate <NSObject>
-@required
-
-- (void)assignmentContext:(nonnull FEMRelationshipAssignmentContext *)context deletedObject:(nonnull id)object;
-
-@end
-
-
-@interface FEMRelationshipAssignmentContext: NSObject
-
-@property (nonatomic, unsafe_unretained, readonly, nonnull) FEMObjectStore *store;
-- (nonnull instancetype)initWithStore:(nonnull FEMObjectStore *)store;
-
-@property (nonatomic, strong, readonly, nonnull) id destinationObject;
-@property (nonatomic, strong, readonly, nonnull) FEMRelationship *relationship;
-
-@property (nonatomic, strong, readonly, nullable) id sourceRelationshipValue;
-@property (nonatomic, strong, readonly, nullable) id targetRelationshipValue;
-
-- (void)deleteRelationshipObject:(nonnull id)object;
-
-@end

+ 0 - 49
Benchmark/Vendor/FastEasyMapping/Core/Assignment Policy/FEMRelationshipAssignmentContext.m

@@ -1,49 +0,0 @@
-//
-// Created by zen on 13/05/15.
-// Copyright (c) 2015 Yalantis. All rights reserved.
-//
-
-#import "FEMRelationshipAssignmentContext.h"
-#import "FEMRelationshipAssignmentContext+Internal.h"
-
-#import "FEMRelationship.h"
-#import "FEMObjectStore.h"
-
-@interface FEMRelationshipAssignmentContext ()
-
-@property (nonatomic, strong) id destinationObject;
-@property (nonatomic, strong) FEMRelationship *relationship;
-
-@property (nonatomic, strong) id sourceRelationshipValue;
-@property (nonatomic, strong) id targetRelationshipValue;
-
-@property (nonatomic, unsafe_unretained) id<FEMRelationshipAssignmentContextDelegate> delegate;
-
-@end
-
-@implementation FEMRelationshipAssignmentContext
-
-- (instancetype)initWithStore:(FEMObjectStore *)store {
-    self = [super init];
-    if (self) {
-        _store = store;
-        self.delegate = store;
-    }
-
-    return self;
-}
-
-- (void)deleteRelationshipObject:(id)object {
-    [self.delegate assignmentContext:self deletedObject:object];
-}
-
-@end
-
-@implementation FEMRelationshipAssignmentContext (Internal)
-
-@dynamic destinationObject;
-@dynamic relationship;
-@dynamic sourceRelationshipValue;
-@dynamic targetRelationshipValue;
-
-@end

+ 0 - 19
Benchmark/Vendor/FastEasyMapping/Core/Cache/FEMManagedObjectCache.h

@@ -1,19 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-
-@class FEMMapping, NSManagedObjectContext;
-
-@interface FEMManagedObjectCache : NSObject
-
-@property (nonatomic, strong, readonly) NSManagedObjectContext *context;
-
-- (instancetype)initWithMapping:(FEMMapping *)mapping representation:(id)representation  context:(NSManagedObjectContext *)context;
-
-- (id)existingObjectForRepresentation:(id)representation mapping:(FEMMapping *)mapping;
-- (id)existingObjectForPrimaryKey:(id)primaryKey mapping:(FEMMapping *)mapping;
-
-- (void)addExistingObject:(id)object mapping:(FEMMapping *)mapping;
-- (NSDictionary *)existingObjectsForMapping:(FEMMapping *)mapping;
-
-@end

+ 0 - 96
Benchmark/Vendor/FastEasyMapping/Core/Cache/FEMManagedObjectCache.m

@@ -1,96 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMManagedObjectCache.h"
-
-#import <CoreData/CoreData.h>
-
-#import "FEMMapping.h"
-#import "FEMRepresentationUtility.h"
-
-@implementation FEMManagedObjectCache {
-	NSManagedObjectContext *_context;
-
-	NSDictionary *_lookupKeysMap;
-	NSMutableDictionary *_lookupObjectsMap;
-}
-
-#pragma mark - Init
-
-
-- (instancetype)initWithMapping:(FEMMapping *)mapping representation:(id)representation context:(NSManagedObjectContext *)context {
-	NSParameterAssert(mapping);
-    NSParameterAssert(representation);
-	NSParameterAssert(context);
-
-	self = [self init];
-	if (self) {
-		_context = context;
-
-		_lookupKeysMap = FEMRepresentationCollectPresentedPrimaryKeys(representation, mapping);
-		_lookupObjectsMap = [NSMutableDictionary new];
-	}
-
-	return self;
-}
-
-#pragma mark - Inspection
-
-- (NSMutableDictionary *)fetchExistingObjectsForMapping:(FEMMapping *)mapping {
-	NSSet *lookupValues = _lookupKeysMap[mapping.entityName];
-	if (lookupValues.count == 0) return [NSMutableDictionary dictionary];
-
-	NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:mapping.entityName];
-	NSPredicate *predicate = [NSPredicate predicateWithFormat:@"%K IN %@", mapping.primaryKey, lookupValues];
-	[fetchRequest setPredicate:predicate];
-	[fetchRequest setFetchLimit:lookupValues.count];
-
-	NSMutableDictionary *output = [NSMutableDictionary new];
-	NSArray *existingObjects = [_context executeFetchRequest:fetchRequest error:NULL];
-	for (NSManagedObject *object in existingObjects) {
-		output[[object valueForKey:mapping.primaryKey]] = object;
-	}
-
-	return output;
-}
-
-- (NSMutableDictionary *)cachedObjectsForMapping:(FEMMapping *)mapping {
-	NSMutableDictionary *entityObjectsMap = _lookupObjectsMap[mapping.entityName];
-	if (!entityObjectsMap) {
-		entityObjectsMap = [self fetchExistingObjectsForMapping:mapping];
-		_lookupObjectsMap[mapping.entityName] = entityObjectsMap;
-	}
-
-	return entityObjectsMap;
-}
-
-- (id)existingObjectForRepresentation:(id)representation mapping:(FEMMapping *)mapping {
-	NSDictionary *entityObjectsMap = [self cachedObjectsForMapping:mapping];
-
-	id primaryKeyValue = FEMRepresentationValueForAttribute(representation, mapping.primaryKeyAttribute);
-	if (primaryKeyValue == nil || primaryKeyValue == NSNull.null) return nil;
-
-	return entityObjectsMap[primaryKeyValue];
-}
-
-- (id)existingObjectForPrimaryKey:(id)primaryKey mapping:(FEMMapping *)mapping {
-    NSDictionary *entityObjectsMap = [self cachedObjectsForMapping:mapping];
-
-    return entityObjectsMap[primaryKey];
-}
-
-- (void)addExistingObject:(id)object mapping:(FEMMapping *)mapping {
-	NSParameterAssert(mapping.primaryKey);
-	NSParameterAssert(object);
-
-	id primaryKeyValue = [object valueForKey:mapping.primaryKey];
-	NSAssert(primaryKeyValue, @"No value for key (%@) on object (%@) found", mapping.primaryKey, object);
-
-	NSMutableDictionary *entityObjectsMap = [self cachedObjectsForMapping:mapping];
-    entityObjectsMap[primaryKeyValue] = object;
-}
-
-- (NSDictionary *)existingObjectsForMapping:(FEMMapping *)mapping {
-    return [[self cachedObjectsForMapping:mapping] copy];
-}
-
-@end

+ 0 - 63
Benchmark/Vendor/FastEasyMapping/Core/Deserializer/FEMDeserializer.h

@@ -1,63 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-#import "FEMManagedObjectMapping.h"
-
-@class FEMObjectStore, FEMMapping, NSManagedObject, NSFetchRequest, NSManagedObjectContext;
-@class FEMDeserializer;
-
-@protocol FEMDeserializerDelegate <NSObject>
-
-@optional
-- (void)deserializer:(nonnull FEMDeserializer *)deserializer willMapObjectFromRepresentation:(nonnull id)representation mapping:(nonnull FEMMapping *)mapping;
-- (void)deserializer:(nonnull FEMDeserializer *)deserializer didMapObject:(nonnull id)object fromRepresentation:(nonnull id)representation mapping:(nonnull FEMMapping *)mapping;
-
-- (void)deserializer:(nonnull FEMDeserializer *)deserializer willMapCollectionFromRepresentation:(nonnull NSArray *)representation mapping:(nonnull FEMMapping *)mapping;
-- (void)deserializer:(nonnull FEMDeserializer *)deserializer didMapCollection:(nonnull NSArray *)collection fromRepresentation:(nonnull NSArray *)representation mapping:(nonnull FEMMapping *)mapping;
-
-@end
-
-@interface FEMDeserializer : NSObject
-
-@property (nonatomic, strong, readonly, nonnull) FEMObjectStore *store;
-- (nonnull instancetype)initWithStore:(nonnull FEMObjectStore *)store NS_DESIGNATED_INITIALIZER;
-
-- (nonnull instancetype)init;
-- (nonnull instancetype)initWithContext:(nonnull NSManagedObjectContext *)context;
-
-@property (nonatomic, unsafe_unretained, nullable) id<FEMDeserializerDelegate> delegate;
-
-- (nonnull id)objectFromRepresentation:(nonnull NSDictionary *)representation mapping:(nonnull FEMMapping *)mapping;
-- (nonnull id)fillObject:(nonnull id)object fromRepresentation:(nonnull NSDictionary *)representation mapping:(nonnull FEMMapping *)mapping;
-- (nonnull NSArray *)collectionFromRepresentation:(nonnull NSArray *)representation mapping:(nonnull FEMMapping *)mapping;
-
-@end
-
-@interface FEMDeserializer (Extension)
-
-+ (nonnull id)objectFromRepresentation:(nonnull NSDictionary *)representation mapping:(nonnull FEMMapping *)mapping context:(nonnull NSManagedObjectContext *)context;
-+ (nonnull id)objectFromRepresentation:(nonnull NSDictionary *)representation mapping:(nonnull FEMMapping *)mapping;
-
-+ (nonnull id)fillObject:(nonnull id)object fromRepresentation:(nonnull NSDictionary *)representation mapping:(nonnull FEMMapping *)mapping;
-
-+ (nonnull NSArray *)collectionFromRepresentation:(nonnull NSArray *)representation mapping:(nonnull FEMMapping *)mapping context:(nonnull NSManagedObjectContext *)context;
-+ (nonnull NSArray *)collectionFromRepresentation:(nonnull NSArray *)representation mapping:(nonnull FEMMapping *)mapping;
-
-@end
-
-
-@interface FEMDeserializer (FEMObjectDeserializer_Deprecated)
-
-+ (nonnull id)deserializeObjectExternalRepresentation:(nonnull NSDictionary *)externalRepresentation usingMapping:(nonnull FEMMapping *)mapping __attribute__((deprecated("Use +[FEMDeserializer objectFromRepresentation:mapping:] instead")));
-+ (nonnull id)fillObject:(nonnull id)object fromExternalRepresentation:(nonnull NSDictionary *)externalRepresentation usingMapping:(nonnull FEMMapping *)mapping __attribute__((deprecated("Use +[FEMDeserializer fillObject:fromRepresentation:mapping:] instead")));
-+ (nonnull NSArray *)deserializeCollectionExternalRepresentation:(nonnull NSArray *)externalRepresentation usingMapping:(nonnull FEMMapping *)mapping __attribute__((deprecated("Use +[FEMDeserializer collectionFromRepresentation:mapping:] instead")));
-
-@end
-
-@interface FEMDeserializer (FEMManagedObjectDeserializer_Deprecated)
-
-+ (nonnull id)deserializeObjectExternalRepresentation:(nonnull NSDictionary *)externalRepresentation usingMapping:(nonnull FEMMapping *)mapping context:(nonnull NSManagedObjectContext *)context __attribute__((deprecated("Use +[FEMDeserializer objectFromRepresentation:mapping:context:] instead")));
-+ (nonnull NSArray *)deserializeCollectionExternalRepresentation:(nonnull NSArray *)externalRepresentation usingMapping:(nonnull FEMMapping *)mapping context:(nonnull NSManagedObjectContext *)context __attribute__((deprecated("Use +[FEMDeserializer collectionFromRepresentation:mapping:context:] instead")));
-+ (nonnull NSArray *)synchronizeCollectionExternalRepresentation:(nonnull NSArray *)externalRepresentation usingMapping:(nonnull FEMMapping *)mapping predicate:(nonnull NSPredicate *)predicate context:(nonnull NSManagedObjectContext *)context __attribute__((unavailable));
-
-@end

+ 0 - 274
Benchmark/Vendor/FastEasyMapping/Core/Deserializer/FEMDeserializer.m

@@ -1,274 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMDeserializer.h"
-
-#import <CoreData/CoreData.h>
-
-#import "FEMTypeIntrospection.h"
-#import "NSArray+FEMPropertyRepresentation.h"
-#import "FEMObjectStore.h"
-#import "FEMRelationshipAssignmentContext+Internal.h"
-#import "FEMRepresentationUtility.h"
-#import "FEMManagedObjectStore.h"
-#import "NSObject+FEMKVCExtension.h"
-
-@implementation FEMDeserializer {
-    struct {
-        BOOL willMapObject: 1;
-        BOOL didMapObject: 1;
-        BOOL willMapCollection: 1;
-        BOOL didMapCollection: 1;
-    } _delegateFlags;
-}
-
-#pragma mark - Init
-
-- (id)initWithStore:(FEMObjectStore *)store {
-    NSParameterAssert(store != nil);
-    self = [super init];
-    if (self) {
-        _store = store;
-    }
-
-    return self;
-}
-
-- (nonnull instancetype)init {
-    return [self initWithStore:[[FEMObjectStore alloc] init]];
-}
-
-- (nonnull instancetype)initWithContext:(NSManagedObjectContext *)context {
-    return [self initWithStore:[[FEMManagedObjectStore alloc] initWithContext:context]];
-}
-
-#pragma mark - Delegate
-
-- (void)setDelegate:(id <FEMDeserializerDelegate>)delegate {
-    _delegate = delegate;
-
-    _delegateFlags.willMapObject = [_delegate respondsToSelector:@selector(deserializer:willMapObjectFromRepresentation:mapping:)];
-    _delegateFlags.didMapObject = [_delegate respondsToSelector:@selector(deserializer:didMapObject:fromRepresentation:mapping:)];
-    _delegateFlags.willMapCollection = [_delegate respondsToSelector:@selector(deserializer:willMapCollectionFromRepresentation:mapping:)];
-    _delegateFlags.didMapCollection = [_delegate respondsToSelector:@selector(deserializer:didMapCollection:fromRepresentation:mapping:)];
-}
-
-#pragma mark - Deserialization
-
-- (void)fulfillObjectRelationships:(id)object fromRepresentation:(NSDictionary *)representation usingMapping:(FEMMapping *)mapping {
-    for (FEMRelationship *relationship in mapping.relationships) {
-        @autoreleasepool {
-            id relationshipRepresentation = FEMRepresentationRootForKeyPath(representation, relationship.keyPath);
-            if (relationshipRepresentation == nil) continue;
-
-            id targetValue = nil;
-            if (relationshipRepresentation != NSNull.null) {
-                if (relationship.isToMany) {
-                    targetValue = [self _collectionFromRepresentation:relationshipRepresentation
-                                                              mapping:relationship.mapping
-                                                     allocateIfNeeded:!relationship.weak];
-
-                    objc_property_t property = class_getProperty([object class], [relationship.property UTF8String]);
-                    targetValue = [targetValue fem_propertyRepresentation:property];
-                } else {
-                    targetValue = [self _objectFromRepresentation:relationshipRepresentation
-                                                          mapping:relationship.mapping
-                                                 allocateIfNeeded:!relationship.weak];
-                }
-            }
-
-            FEMRelationshipAssignmentContext *context = [self.store newAssignmentContext];
-            context.destinationObject = object;
-            context.relationship = relationship;
-            context.sourceRelationshipValue = [object valueForKey:relationship.property];
-            context.targetRelationshipValue = targetValue;
-
-            id assignmentValue = relationship.assignmentPolicy(context);
-            [object setValue:assignmentValue forKey:relationship.property];
-        }
-    }
-}
-
-- (void)setAttributeValue:(FEMAttribute *)attribute onObject:(id)object fromRepresentation:(id)representation {
-    id value = FEMRepresentationValueForAttribute(representation, attribute);
-    if (value == NSNull.null) {
-        if (!FEMObjectPropertyTypeIsScalar(object, attribute.property)) {
-            [object setValue:nil forKey:attribute.property];
-        }
-    } else if (value) {
-        [object fem_setValueIfDifferent:value forKey:attribute.property];
-    }
-}
-
-- (id)_fillObject:(id)object fromRepresentation:(NSDictionary *)representation mapping:(FEMMapping *)mapping {
-    for (FEMAttribute *attribute in mapping.attributes) {
-        [self setAttributeValue:attribute onObject:object fromRepresentation:representation];
-    }
-
-    [self fulfillObjectRelationships:object fromRepresentation:representation usingMapping:mapping];
-
-    return object;
-}
-
-- (id)_objectFromRepresentation:(NSDictionary *)representation mapping:(FEMMapping *)mapping allocateIfNeeded:(BOOL)allocate {
-    id object = [self.store registeredObjectForRepresentation:representation mapping:mapping];
-    if (!object && allocate) {
-        object = [self.store newObjectForMapping:mapping];
-    }
-    
-    if (!object) {
-        return nil;
-    }
-
-    if (_delegateFlags.willMapObject) {
-        [self.delegate deserializer:self willMapObjectFromRepresentation:representation mapping:mapping];
-    }
-
-    [self _fillObject:object fromRepresentation:representation mapping:mapping];
-
-    if ([self.store canRegisterObject:object forMapping:mapping]) {
-        [self.store registerObject:object forMapping:mapping];
-    }
-
-    if (_delegateFlags.didMapObject) {
-        [self.delegate deserializer:self didMapObject:object fromRepresentation:representation mapping:mapping];
-    }
-
-    return object;
-}
-
-- (NSArray *)_collectionFromRepresentation:(NSArray *)representation mapping:(FEMMapping *)mapping allocateIfNeeded:(BOOL)allocate {
-    if (_delegateFlags.willMapCollection) {
-        [self.delegate deserializer:self willMapCollectionFromRepresentation:representation mapping:mapping];
-    }
-
-    NSMutableArray *output = [[NSMutableArray alloc] initWithCapacity:representation.count];
-    for (id objectRepresentation in representation) {
-        @autoreleasepool {
-            id object = [self _objectFromRepresentation:objectRepresentation mapping:mapping allocateIfNeeded:allocate];
-            [output addObject:object];
-        }
-    }
-
-    if (_delegateFlags.didMapCollection) {
-        [self.delegate deserializer:self didMapCollection:output fromRepresentation:representation mapping:mapping];
-    }
-
-    return output;
-}
-
-#pragma mark - Public
-
-
-- (id)objectFromRepresentation:(NSDictionary *)representation mapping:(FEMMapping *)mapping {
-    [self.store prepareTransactionForMapping:mapping ofRepresentation:@[representation]];
-    [self.store beginTransaction];
-
-    id root = FEMRepresentationRootForKeyPath(representation, mapping.rootPath);
-    id object = [self _objectFromRepresentation:root mapping:mapping allocateIfNeeded:YES];
-
-    [self.store commitTransaction];
-
-    return object;
-}
-
-- (id)fillObject:(id)object fromRepresentation:(NSDictionary *)representation mapping:(FEMMapping *)mapping {
-    if (_delegateFlags.willMapObject) {
-        [self.delegate deserializer:self willMapObjectFromRepresentation:representation mapping:mapping];
-    }
-
-    [self.store prepareTransactionForMapping:mapping ofRepresentation:@[representation]];
-    [self.store beginTransaction];
-
-    id root = FEMRepresentationRootForKeyPath(representation, mapping.rootPath);
-    [self _fillObject:object fromRepresentation:root mapping:mapping];
-
-    [self.store commitTransaction];
-
-    if (_delegateFlags.didMapObject) {
-        [self.delegate deserializer:self didMapObject:object fromRepresentation:representation mapping:mapping];
-    }
-
-    return object;
-}
-
-- (NSArray *)collectionFromRepresentation:(NSArray *)representation mapping:(FEMMapping *)mapping {
-    [self.store prepareTransactionForMapping:mapping ofRepresentation:representation];
-    [self.store beginTransaction];
-
-    id root = FEMRepresentationRootForKeyPath(representation, mapping.rootPath);
-    NSArray *objects = [self _collectionFromRepresentation:root mapping:mapping allocateIfNeeded:YES];
-
-    [self.store commitTransaction];
-
-    return objects;
-}
-
-@end
-
-@implementation FEMDeserializer (Extension)
-
-+ (id)objectFromRepresentation:(NSDictionary *)representation mapping:(FEMMapping *)mapping context:(NSManagedObjectContext *)context {
-    FEMManagedObjectStore *store = [[FEMManagedObjectStore alloc] initWithContext:context];
-    FEMDeserializer *deserializer = [[FEMDeserializer alloc] initWithStore:store];
-    return [deserializer objectFromRepresentation:representation mapping:mapping];
-}
-
-+ (id)objectFromRepresentation:(NSDictionary *)representation mapping:(FEMMapping *)mapping {
-    FEMObjectStore *store = [[FEMObjectStore alloc] init];
-    FEMDeserializer *deserializer = [[FEMDeserializer alloc] initWithStore:store];
-    return [deserializer objectFromRepresentation:representation mapping:mapping];
-}
-
-+ (id)fillObject:(id)object fromRepresentation:(NSDictionary *)representation mapping:(FEMMapping *)mapping {
-    FEMObjectStore *store = nil;
-    if ([object isKindOfClass:NSManagedObject.class]) {
-        store = [[FEMManagedObjectStore alloc] initWithContext:[(NSManagedObject *)object managedObjectContext]];
-    } else {
-        store = [[FEMObjectStore alloc] init];
-    }
-
-    FEMDeserializer *deserializer = [[FEMDeserializer alloc] initWithStore:store];
-    return [deserializer fillObject:object fromRepresentation:representation mapping:mapping];
-};
-
-+ (NSArray *)collectionFromRepresentation:(NSArray *)representation mapping:(FEMMapping *)mapping context:(NSManagedObjectContext *)context {
-    FEMManagedObjectStore *store = [[FEMManagedObjectStore alloc] initWithContext:context];
-    FEMDeserializer *deserializer = [[FEMDeserializer alloc] initWithStore:store];
-    return [deserializer collectionFromRepresentation:representation mapping:mapping];
-}
-
-+ (NSArray *)collectionFromRepresentation:(NSArray *)representation mapping:(FEMMapping *)mapping {
-    FEMObjectStore *store = [[FEMObjectStore alloc] init];
-    FEMDeserializer *deserializer = [[FEMDeserializer alloc] initWithStore:store];
-    return [deserializer collectionFromRepresentation:representation mapping:mapping];
-}
-
-@end
-
-@implementation FEMDeserializer (FEMManagedObjectDeserializer_Deprecated)
-
-+ (id)deserializeObjectExternalRepresentation:(NSDictionary *)externalRepresentation usingMapping:(FEMMapping *)mapping context:(NSManagedObjectContext *)context {
-    return [self objectFromRepresentation:externalRepresentation mapping:mapping context:context];
-}
-
-+ (NSArray *)deserializeCollectionExternalRepresentation:(NSArray *)externalRepresentation usingMapping:(FEMMapping *)mapping context:(NSManagedObjectContext *)context {
-    return [self collectionFromRepresentation:externalRepresentation mapping:mapping context:context];
-}
-
-@end
-
-@implementation FEMDeserializer (FEMObjectDeserializer_Deprecated)
-
-+ (id)deserializeObjectExternalRepresentation:(NSDictionary *)externalRepresentation usingMapping:(FEMMapping *)mapping {
-    return [self objectFromRepresentation:externalRepresentation mapping:mapping];
-}
-
-+ (id)fillObject:(NSManagedObject *)object fromExternalRepresentation:(NSDictionary *)externalRepresentation usingMapping:(FEMMapping *)mapping {
-    return [self fillObject:object fromRepresentation:externalRepresentation mapping:mapping];
-}
-
-+ (NSArray *)deserializeCollectionExternalRepresentation:(NSArray *)externalRepresentation usingMapping:(FEMMapping *)mapping {
-    return [self collectionFromRepresentation:externalRepresentation mapping:mapping];
-}
-
-@end

+ 0 - 5
Benchmark/Vendor/FastEasyMapping/Core/Deserializer/FEMManagedObjectDeserializer.h

@@ -1,5 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMDeserializer.h"
-
-@compatibility_alias FEMManagedObjectDeserializer FEMDeserializer;

+ 0 - 5
Benchmark/Vendor/FastEasyMapping/Core/Deserializer/FEMObjectDeserializer.h

@@ -1,5 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMDeserializer.h"
-
-@compatibility_alias FEMObjectDeserializer FEMDeserializer;

+ 0 - 53
Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMAttribute.h

@@ -1,53 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-
-#import "FEMTypes.h"
-#import "FEMProperty.h"
-
-@interface FEMAttribute : NSObject <FEMProperty>
-
-- (nullable id)mapValue:(nullable id)value;
-- (nullable id)reverseMapValue:(nullable id)value;
-
-- (nonnull instancetype)initWithProperty:(nonnull NSString *)property keyPath:(nullable NSString *)keyPath map:(nullable FEMMapBlock)map reverseMap:(nullable FEMMapBlock)reverseMap;
-+ (nonnull instancetype)mappingOfProperty:(nonnull NSString *)property toKeyPath:(nullable NSString *)keyPath map:(nullable FEMMapBlock)map reverseMap:(nullable FEMMapBlock)reverseMap;
-
-@end
-
-@interface FEMAttribute (Shortcut)
-
-/**
-* same as +[FEMAttribute mappingOfProperty:property toKeyPath:property];
-*/
-+ (nonnull instancetype)mappingOfProperty:(nonnull NSString *)property;
-
-/**
-* same as +[FEMAttribute mappingOfProperty:property toKeyPath:nil map:NULL];
-*/
-+ (nonnull instancetype)mappingOfProperty:(nonnull NSString *)property toKeyPath:(nonnull NSString *)keyPath;
-
-/**
-* same as +[FEMAttribute mappingOfProperty:property toKeyPath:nil map:map];
-*/
-+ (nonnull instancetype)mappingOfProperty:(nonnull NSString *)property map:(nonnull FEMMapBlock)map;
-
-+ (nonnull instancetype)mappingOfProperty:(nonnull NSString *)property reverseMap:(nonnull FEMMapBlock)reverseMap;
-
-/**
-* same as +[FEMAttribute mappingOfProperty:property toKeyPath:nil map:NULL reverseMap:NULL];
-*/
-+ (nonnull instancetype)mappingOfProperty:(nonnull NSString *)property toKeyPath:(nonnull NSString *)keyPath map:(nonnull FEMMapBlock)map;
-
-/**
-* create mapping object, based on NSDateFormatter.
-* NSDateFormatter instance uses en_US_POSIX locale and UTC Timezone
-*/
-+ (nonnull instancetype)mappingOfProperty:(nonnull NSString *)property toKeyPath:(nullable NSString *)keyPath dateFormat:(nonnull NSString *)dateFormat;
-
-/**
-* property represented by NSURL, value at keyPath - NSString
-*/
-+ (nonnull instancetype)mappingOfURLProperty:(nonnull NSString *)property toKeyPath:(nullable NSString *)keyPath;
-
-@end

+ 0 - 105
Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMAttribute.m

@@ -1,105 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMAttribute.h"
-
-@implementation FEMAttribute {
-    FEMMapBlock _map;
-    FEMMapBlock _reverseMap;
-}
-
-@synthesize property = _property;
-@synthesize keyPath = _keyPath;
-
-#pragma mark - Init
-
-- (id)initWithProperty:(NSString *)property keyPath:(NSString *)keyPath map:(FEMMapBlock)map reverseMap:(FEMMapBlock)reverseMap {
-    NSParameterAssert(property.length > 0);
-
-    self = [super init];
-    if (self) {
-        self.property = property;
-        self.keyPath = keyPath;
-
-        FEMMapBlock passthroughMap = ^(id value) {
-            return value;
-        };
-
-        _map = map ?: passthroughMap;
-        _reverseMap = reverseMap ?: passthroughMap;
-    }
-
-    return self;
-}
-
-+ (instancetype)mappingOfProperty:(NSString *)property toKeyPath:(NSString *)keyPath map:(FEMMapBlock)map reverseMap:(FEMMapBlock)reverseMap {
-    return [[self alloc] initWithProperty:property keyPath:keyPath map:map reverseMap:reverseMap];
-}
-
-#pragma mark - Description
-
-- (NSString *)description {
-    return [NSString stringWithFormat:
-        @"<%@ %p> property:%@ keyPath:%@",
-        NSStringFromClass(self.class),
-        (__bridge void *) self,
-        self.property,
-        self.keyPath
-    ];
-}
-
-#pragma mark - Mapping
-
-- (id)mapValue:(id)value {
-    return _map(value);
-}
-
-- (id)reverseMapValue:(id)value {
-    return _reverseMap(value);
-}
-
-@end
-
-@implementation FEMAttribute (Shortcut)
-
-+ (instancetype)mappingOfProperty:(NSString *)property toKeyPath:(NSString *)keyPath map:(FEMMapBlock)map {
-    return [self mappingOfProperty:property toKeyPath:keyPath map:map reverseMap:NULL];
-}
-
-+ (instancetype)mappingOfProperty:(NSString *)property toKeyPath:(NSString *)keyPath {
-    return [self mappingOfProperty:property toKeyPath:keyPath map:NULL reverseMap:NULL];
-}
-
-+ (instancetype)mappingOfProperty:(NSString *)property {
-    return [self mappingOfProperty:property toKeyPath:nil map:NULL reverseMap:NULL];
-}
-
-+ (instancetype)mappingOfProperty:(NSString *)property map:(FEMMapBlock)map {
-    return [self mappingOfProperty:property toKeyPath:nil map:map reverseMap:NULL];
-}
-
-+ (nonnull instancetype)mappingOfProperty:(nonnull NSString *)property reverseMap:(nonnull FEMMapBlock)reverseMap {
-    return [self mappingOfProperty:property toKeyPath:nil map:NULL reverseMap:reverseMap];
-}
-
-+ (instancetype)mappingOfProperty:(NSString *)property toKeyPath:(NSString *)keyPath dateFormat:(NSString *)dateFormat {
-    NSDateFormatter *formatter = [NSDateFormatter new];
-    [formatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]];
-    [formatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"UTC"]];
-    [formatter setDateFormat:dateFormat];
-
-    return [self mappingOfProperty:property toKeyPath:keyPath map:^id(id value) {
-        return [value isKindOfClass:[NSString class]] ? [formatter dateFromString:value] : NSNull.null;
-    } reverseMap:^id(id value) {
-        return [formatter stringFromDate:value];
-    }];
-}
-
-+ (instancetype)mappingOfURLProperty:(NSString *)property toKeyPath:(NSString *)keyPath {
-    return [FEMAttribute mappingOfProperty:property toKeyPath:keyPath map:^id(id value) {
-        return [value isKindOfClass:NSString.class] ? [NSURL URLWithString:value] : NSNull.null;
-    }                           reverseMap:^id(NSURL *value) {
-        return [value absoluteString];
-    }];
-}
-
-@end

+ 0 - 7
Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMManagedObjectMapping.h

@@ -1,7 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-
-#import "FEMMapping.h"
-
-@compatibility_alias FEMManagedObjectMapping FEMMapping;

+ 0 - 67
Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMMapping.h

@@ -1,67 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-
-#import "FEMAttribute.h"
-#import "FEMRelationship.h"
-
-@interface FEMMapping : NSObject {
-    @protected
-	NSMutableDictionary *_attributeMap;
-	NSMutableDictionary *_relationshipMap;
-}
-
-- (nonnull instancetype)init __attribute__((unavailable("use -[FEMMapping initWithObjectClass:] or -[FEMMapping initWithEntityName:] insted")));
-+ (nonnull instancetype)new __attribute__((unavailable("use -[FEMMapping initWithObjectClass:] or -[FEMMapping initWithEntityName:] insted")));
-- (nonnull instancetype)initWithRootPath:(nullable NSString *)rootPath __attribute__((unavailable("use -[FEMMapping initWithObjectClass:] or -[FEMMapping initWithEntityName:] insted")));
-
-- (nonnull instancetype)initWithObjectClass:(nonnull Class)objectClass NS_DESIGNATED_INITIALIZER;
-- (nonnull instancetype)initWithObjectClass:(nonnull Class)objectClass rootPath:(nullable NSString *)rootPath;
-
-- (nonnull instancetype)initWithEntityName:(nonnull NSString *)entityName NS_DESIGNATED_INITIALIZER;
-- (nonnull instancetype)initWithEntityName:(nonnull NSString *)entityName rootPath:(nullable NSString *)rootPath;
-
-@property (nonatomic, readonly, nullable) Class objectClass;
-@property (nonatomic, copy, readonly, nullable) NSString *entityName;
-
-@property (nonatomic, copy, nullable) NSString *rootPath;
-
-@property (nonatomic, copy, nullable) NSString *primaryKey;
-@property (nonatomic, strong, readonly, nullable) FEMAttribute *primaryKeyAttribute;
-
-@property (nonatomic, strong, readonly, nonnull) NSArray *attributes;
-- (void)addAttribute:(nonnull FEMAttribute *)attribute;
-- (nullable FEMAttribute *)attributeForProperty:(nonnull NSString *)property;
-
-@property (nonatomic, strong, readonly, nonnull) NSArray *relationships;
-- (void)addRelationship:(nonnull FEMRelationship *)relationship;
-- (nullable FEMRelationship *)relationshipForProperty:(nonnull NSString *)property;
-
-@end
-
-@interface FEMMapping (Shortcut)
-
-- (void)addAttributesFromArray:(nonnull NSArray *)attributes;
-- (void)addAttributesFromDictionary:(nonnull NSDictionary *)attributesToKeyPath;
-- (void)addAttributeWithProperty:(nonnull NSString *)property keyPath:(nullable NSString *)keyPath;
-
-- (void)addRelationshipMapping:(nonnull FEMMapping *)mapping forProperty:(nonnull NSString *)property keyPath:(nullable NSString *)keyPath;
-- (void)addToManyRelationshipMapping:(nonnull FEMMapping *)mapping forProperty:(nonnull NSString *)property keyPath:(nullable NSString *)keyPath;
-
-@end
-
-@interface FEMMapping (FEMObjectMapping_Deprecated)
-
-+ (nonnull FEMMapping *)mappingForClass:(nonnull Class)objectClass configuration:(nonnull void (^)(FEMMapping * __nonnull mapping))configuration __attribute__((deprecated("Use -[FEMMapping initWithObjectClass:] instead")));
-+ (nonnull FEMMapping *)mappingForClass:(nonnull Class)objectClass rootPath:(nullable NSString *)rootPath configuration:(nonnull void (^)(FEMMapping * __nonnull mapping))configuration __attribute__((deprecated("Use -[FEMMapping initWithObjectClass:rootPath:] instead")));
-
-@end
-
-
-@interface FEMMapping (FEMManagedObjectMapping_Deprecated)
-
-+ (nonnull FEMMapping *)mappingForEntityName:(nonnull NSString *)entityName __attribute__((deprecated("Use -[FEMMapping initWithEntityName:] instead")));
-+ (nonnull FEMMapping *)mappingForEntityName:(nonnull NSString *)entityName configuration:(nullable void (^)(FEMMapping * __nonnull sender))configuration __attribute__((deprecated("Use -[FEMMapping initWithEntityName:] instead")));
-+ (nonnull FEMMapping *)mappingForEntityName:(nonnull NSString *)entityName rootPath:(nullable NSString *)rootPath configuration:(nullable void (^)(FEMMapping * __nonnull sender))configuration __attribute__((deprecated("Use -[FEMMapping initWithEntityName:rootPath:] instead")));
-
-@end

+ 0 - 203
Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMMapping.m

@@ -1,203 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMMapping.h"
-#import "FEMManagedObjectMapping.h"
-#import "FEMObjectMapping.h"
-
-@implementation FEMMapping
-
-#pragma mark - Init
-
-- (instancetype)initWithObjectClass:(Class)objectClass {
-    self = [super init];
-    if (self) {
-        _attributeMap = [NSMutableDictionary new];
-        _relationshipMap = [NSMutableDictionary new];
-
-        _objectClass = objectClass;
-    }
-
-    return self;
-}
-
-- (instancetype)initWithObjectClass:(Class)objectClass rootPath:(NSString *)rootPath {
-    self = [self initWithObjectClass:objectClass];
-    if (self) {
-        self.rootPath = rootPath;
-    }
-    
-    return self;
-}
-
-- (instancetype)initWithEntityName:(NSString *)entityName {
-    self = [super init];
-    if (self) {
-        _attributeMap = [NSMutableDictionary new];
-        _relationshipMap = [NSMutableDictionary new];
-
-        _entityName = [entityName copy];
-    }
-
-    return self;
-}
-
-- (instancetype)initWithEntityName:(NSString *)entityName rootPath:(NSString *)rootPath {
-    self = [self initWithEntityName:entityName];
-    if (self) {
-        self.rootPath = rootPath;
-    }
-    
-    return self;
-}
-
-#pragma mark - Attribute Mapping
-
-- (void)addPropertyMapping:(id<FEMProperty>)propertyMapping toMap:(NSMutableDictionary *)map {
-	NSParameterAssert(propertyMapping);
-	NSAssert(
-		propertyMapping.property.length > 0,
-		@"It's illegal to add mapping without specified property:%@",
-		propertyMapping
-	);
-
-#ifdef DEBUG
-	FEMAttribute *existingMapping = map[propertyMapping.property];
-	if (existingMapping) {
-		NSLog(@"%@ replacing %@ with %@", NSStringFromClass(self.class), existingMapping, propertyMapping);
-	}
-#endif
-
-	map[propertyMapping.property] = propertyMapping;
-}
-
-- (void)addAttribute:(FEMAttribute *)attribute {
-    [self addPropertyMapping:attribute toMap:_attributeMap];
-}
-
-- (FEMAttribute *)attributeForProperty:(NSString *)property {
-	return _attributeMap[property];
-}
-
-#pragma mark - Relationship Mapping
-
-- (void)addRelationship:(FEMRelationship *)relationship {
-    [self addPropertyMapping:relationship toMap:_relationshipMap];
-}
-
-- (FEMRelationship *)relationshipForProperty:(NSString *)property {
-	return _relationshipMap[property];
-}
-
-#pragma mark - Properties
-
-- (NSArray *)attributes {
-	return [_attributeMap allValues];
-}
-
-- (NSArray *)relationships {
-	return [_relationshipMap allValues];
-}
-
-#pragma mark -
-
-- (FEMAttribute *)primaryKeyAttribute {
-    return _attributeMap[self.primaryKey];
-}
-
-#pragma mark - Description
-
-- (NSString *)description {
-    NSMutableString *description = [NSMutableString stringWithFormat:
-        @"<%@ %p>\n<%%@> {\nrootPath:%@\n",
-        NSStringFromClass(self.class),
-        (__bridge void *) self,
-        self.rootPath
-    ];
-
-    [description appendString:@"attributes {\n"];
-    for (FEMAttribute *mapping in self.attributes) {
-        [description appendFormat:@"\t(%@),\n", [mapping description]];
-    }
-    [description appendString:@"}\n"];
-
-    [description appendString:@"relationships {\n"];
-    for (FEMRelationship *relationshipMapping in self.relationships) {
-        [description appendFormat:@"\t(%@),", [relationshipMapping description]];
-    }
-    [description appendFormat:@"}\n"];
-
-    return description;
-}
-
-@end
-
-@implementation FEMMapping (Shortcut)
-
-- (void)addAttributesFromDictionary:(NSDictionary *)attributesToKeyPath {
-	[attributesToKeyPath enumerateKeysAndObjectsUsingBlock:^(id attribute, id keyPath, BOOL *stop) {
-        [self addAttribute:[FEMAttribute mappingOfProperty:attribute toKeyPath:keyPath]];
-	}];
-}
-
-- (void)addAttributesFromArray:(NSArray *)attributes {
-	for (NSString *attribute in attributes) {
-        [self addAttribute:[FEMAttribute mappingOfProperty:attribute toKeyPath:attribute]];
-	}
-}
-
-- (void)addAttributeWithProperty:(NSString *)property keyPath:(NSString *)keyPath {
-    [self addAttribute:[FEMAttribute mappingOfProperty:property toKeyPath:keyPath]];
-}
-
-- (void)addRelationshipMapping:(FEMMapping *)mapping forProperty:(NSString *)property keyPath:(NSString *)keyPath {
-    FEMRelationship *relationship = [[FEMRelationship alloc] initWithProperty:property keyPath:keyPath mapping:mapping];
-    [self addRelationship:relationship];
-}
-
-- (void)addToManyRelationshipMapping:(FEMMapping *)mapping forProperty:(NSString *)property keyPath:(NSString *)keyPath {
-    FEMRelationship *relationship = [[FEMRelationship alloc] initWithProperty:property keyPath:keyPath mapping:mapping];
-    relationship.toMany = YES;
-    [self addRelationship:relationship];
-}
-
-@end
-
-@implementation FEMMapping (FEMManagedObjectMapping_Deprecated)
-
-+ (FEMMapping *)mappingForEntityName:(NSString *)entityName {
-    FEMMapping *mapping = [[FEMMapping alloc] initWithEntityName:entityName];
-    return mapping;
-}
-
-+ (FEMMapping *)mappingForEntityName:(NSString *)entityName
-                       configuration:(void (^)(FEMManagedObjectMapping *sender))configuration {
-    FEMMapping *mapping = [[FEMMapping alloc] initWithEntityName:entityName];
-    configuration(mapping);
-    return mapping;
-}
-
-+ (FEMMapping *)mappingForEntityName:(NSString *)entityName
-                            rootPath:(NSString *)rootPath
-                       configuration:(void (^)(FEMManagedObjectMapping *sender))configuration {
-    FEMMapping *mapping = [[FEMMapping alloc] initWithEntityName:entityName rootPath:rootPath];
-    configuration(mapping);
-    return mapping;
-}
-
-@end
-
-@implementation FEMMapping (FEMObjectMapping_Deprecated)
-
-+ (FEMMapping *)mappingForClass:(Class)objectClass configuration:(void (^)(FEMObjectMapping *mapping))configuration {
-    FEMMapping *mapping = [[FEMMapping alloc] initWithObjectClass:objectClass];
-    configuration(mapping);
-    return mapping;
-}
-
-+ (FEMMapping *)mappingForClass:(Class)objectClass rootPath:(NSString *)rootPath configuration:(void (^)(FEMObjectMapping *mapping))configuration {
-    FEMMapping *mapping = [[FEMMapping alloc] initWithObjectClass:objectClass rootPath:rootPath];
-    configuration(mapping);
-    return mapping;
-}
-
-@end

+ 0 - 5
Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMObjectMapping.h

@@ -1,5 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMMapping.h"
-
-@compatibility_alias FEMObjectMapping FEMMapping;

+ 0 - 10
Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMProperty.h

@@ -1,10 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-
-@protocol FEMProperty <NSObject>
-
-@property (nonatomic, copy, nonnull) NSString *property;
-@property (nonatomic, copy, nullable) NSString *keyPath;
-
-@end

+ 0 - 63
Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMRelationship.h

@@ -1,63 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-
-#import "FEMAssignmentPolicy.h"
-#import "FEMProperty.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class FEMMapping;
-
-@interface FEMRelationship : NSObject <FEMProperty>
-
-@property (nonatomic, strong) FEMMapping *mapping;
-@property (nonatomic, getter=isToMany) BOOL toMany;
-
-@property (nonatomic) BOOL weak;
-@property (nonatomic, copy) FEMAssignmentPolicy assignmentPolicy;
-
-- (instancetype)init NS_UNAVAILABLE;
-
-- (instancetype)initWithProperty:(NSString *)property keyPath:(nullable NSString *)keyPath mapping:(FEMMapping *)mapping NS_DESIGNATED_INITIALIZER;
-- (instancetype)initWithProperty:(NSString *)property mapping:(FEMMapping *)mapping;
-- (instancetype)initWithProperty:(NSString *)property keyPath:(NSString *)keyPath mapping:(FEMMapping *)mapping assignmentPolicy:(FEMAssignmentPolicy)assignmentPolicy;
-
-- (void)setMapping:(FEMMapping *)mapping forKeyPath:(nullable NSString *)keyPath;
-
-@end
-
-@interface FEMRelationship (Deprecated)
-
-- (void)setObjectMapping:(FEMMapping *)objectMapping forKeyPath:(nullable NSString *)keyPath __attribute__((deprecated("Use -[FEMRelationship setMappaing:forKeyPath:] instead")));
-
-- (instancetype)initWithProperty:(NSString *)property
-                         keyPath:(nullable NSString *)keyPath
-                assignmentPolicy:(nullable FEMAssignmentPolicy)policy
-                   objectMapping:(nullable FEMMapping *)objectMapping __attribute__((deprecated("Use -[FEMRelationship initWithProperty:keyPath:mapping:assignmentPolicy:] instead")));
-
-/**
-* same as + [FEMRelationship mappingOfProperty:property toKeyPath:nil mapping:mapping];
-*/
-+ (instancetype)mappingOfProperty:(NSString *)property objectMapping:(FEMMapping *)objectMapping __attribute__((deprecated("Use -[FEMRelationship initWithProperty:mapping:] instead")));
-
-+ (instancetype)mappingOfProperty:(NSString *)property
-                        toKeyPath:(nullable NSString *)keyPath
-                    objectMapping:(FEMMapping *)objectMapping __attribute__((deprecated("Use -[FEMRelationship initWithProperty:keyPath:mapping:] instead")));
-
-@property (nonatomic, strong) FEMMapping *objectMapping __attribute__((deprecated("Use FEMRelationship.mapping instead")));
-
-@end
-
-@interface FEMRelationship (Unavailable)
-
-+ (instancetype)mappingOfProperty:(NSString *)property
-                    configuration:(void (^)(FEMRelationship *__mapping))configuration __attribute__((unavailable("Use -[FEMRelationship initWithProperty:keyPath:mapping:] instead")));
-
-+ (instancetype)mappingOfProperty:(NSString *)property
-                        toKeyPath:(nullable NSString *)keyPath
-                    configuration:(void (^)(FEMRelationship *__mapping))configuration __attribute__((unavailable("Use -[FEMRelationship initWithProperty:keyPath:mapping:] instead")));
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 99
Benchmark/Vendor/FastEasyMapping/Core/Mapping/FEMRelationship.m

@@ -1,99 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMRelationship.h"
-#import "FEMMapping.h"
-
-@implementation FEMRelationship
-
-@synthesize property = _property;
-@synthesize keyPath = _keyPath;
-
-#pragma mark - Init
-
-- (instancetype)initWithProperty:(NSString *)property mapping:(FEMMapping *)mapping {
-    return [self initWithProperty:property keyPath:nil mapping:mapping];
-}
-
-- (instancetype)initWithProperty:(NSString *)property keyPath:(NSString *)keyPath mapping:(FEMMapping *)mapping {
-    self = [super init];
-    if (self) {
-        self.property = property;
-        self.keyPath = keyPath;
-        self.mapping = mapping;
-        self.assignmentPolicy = FEMAssignmentPolicyAssign;
-    }
-
-    return self;
-}
-
-- (instancetype)initWithProperty:(NSString *)property keyPath:(NSString *)keyPath mapping:(FEMMapping *)mapping assignmentPolicy:(FEMAssignmentPolicy)assignmentPolicy {
-    self = [self initWithProperty:property keyPath:keyPath mapping:mapping];
-    if (self) {
-        self.assignmentPolicy = assignmentPolicy;
-    }
-    return self;
-}
-
-#pragma mark - Shortcut
-
-- (void)setMapping:(nonnull FEMMapping *)mapping forKeyPath:(nullable NSString *)keyPath {
-    self.mapping = mapping;
-    self.keyPath = keyPath;
-}
-
-#pragma mark - Description
-
-- (NSString *)description {
-    return [NSString stringWithFormat:
-        @"<%@ %p>\n {\nproperty:%@ keyPath:%@ toMany:%@\nmapping:(%@)}\n",
-        NSStringFromClass(self.class),
-        (__bridge void *) self,
-        self.property,
-        self.keyPath,
-        @(self.toMany),
-        [self.mapping description]
-    ];
-}
-
-@end
-
-@implementation FEMRelationship (Deprecated)
-
-@dynamic objectMapping;
-
-- (FEMMapping *)objectMapping {
-    return self.mapping;
-}
-
-- (void)setObjectMapping:(FEMMapping *)objectMapping {
-    self.mapping = objectMapping;
-}
-
-+ (instancetype)mappingOfProperty:(NSString *)property keyPath:(NSString *)keyPath objectMapping:(FEMMapping *)objectMapping {
-    return [[self alloc] initWithProperty:property keyPath:keyPath mapping:objectMapping];
-}
-
-#pragma mark - Init
-
-- (instancetype)initWithProperty:(NSString *)property
-                         keyPath:(NSString *)keyPath
-                assignmentPolicy:(FEMAssignmentPolicy)policy
-                   objectMapping:(FEMMapping *)objectMapping {
-    return [self initWithProperty:property keyPath:keyPath mapping:objectMapping assignmentPolicy:policy];
-}
-
-+ (instancetype)mappingOfProperty:(NSString *)property toKeyPath:(NSString *)keyPath objectMapping:(FEMMapping *)objectMapping {
-    return [[self alloc] initWithProperty:property keyPath:keyPath mapping:objectMapping];
-}
-
-+ (instancetype)mappingOfProperty:(NSString *)property objectMapping:(FEMMapping *)objectMapping {
-    return [[self alloc] initWithProperty:property mapping:objectMapping];
-}
-
-#pragma mark - Property objectMapping
-
-- (void)setObjectMapping:(FEMMapping *)objectMapping forKeyPath:(NSString *)keyPath {
-    [self setMapping:objectMapping forKeyPath:keyPath];
-}
-
-@end

+ 0 - 12
Benchmark/Vendor/FastEasyMapping/Core/Serializer/FEMSerializer.h

@@ -1,12 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-#import "FEMMapping.h"
-#import "FEMSerializer.h"
-
-@interface FEMSerializer : NSObject
-
-+ (nonnull NSDictionary *)serializeObject:(nonnull id)object usingMapping:(nonnull FEMMapping *)mapping;
-+ (nonnull id)serializeCollection:(nonnull NSArray *)collection usingMapping:(nonnull FEMMapping *)mapping;
-
-@end

+ 0 - 99
Benchmark/Vendor/FastEasyMapping/Core/Serializer/FEMSerializer.m

@@ -1,99 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMSerializer.h"
-#import "FEMAttribute.h"
-#import "FEMTypeIntrospection.h"
-#import "FEMRelationship.h"
-
-@implementation FEMSerializer
-
-+ (NSDictionary *)_serializeObject:(id)object usingMapping:(FEMMapping *)mapping {
-	NSMutableDictionary *representation = [NSMutableDictionary dictionary];
-
-	for (FEMAttribute *fieldMapping in mapping.attributes) {
-		[self setValueOnRepresentation:representation fromObject:object withFieldMapping:fieldMapping];
-	}
-
-	for (FEMRelationship *relationshipMapping in mapping.relationships) {
-		[self setRelationshipObjectOn:representation usingMapping:relationshipMapping fromObject:object];
-	}
-
-	return representation;
-}
-
-+ (NSDictionary *)serializeObject:(id)object usingMapping:(FEMMapping *)mapping {
-	NSDictionary *representation = [self _serializeObject:object usingMapping:mapping];
-
-	return mapping.rootPath.length > 0 ? @{mapping.rootPath : representation} : representation;
-}
-
-+ (id)_serializeCollection:(NSArray *)collection usingMapping:(FEMMapping *)mapping {
-	NSMutableArray *representation = [NSMutableArray new];
-
-	for (id object in collection) {
-		NSDictionary *objectRepresentation = [self _serializeObject:object usingMapping:mapping];
-		[representation addObject:objectRepresentation];
-	}
-
-	return representation;
-}
-
-+ (id)serializeCollection:(NSArray *)collection usingMapping:(FEMMapping *)mapping {
-	NSArray *representation = [self _serializeCollection:collection usingMapping:mapping];
-
-	return mapping.rootPath.length > 0 ? @{mapping.rootPath: representation} : representation;
-}
-
-+ (void)setValueOnRepresentation:(NSMutableDictionary *)representation fromObject:(id)object withFieldMapping:(FEMAttribute *)fieldMapping {
-	id returnedValue = [object valueForKey:fieldMapping.property];
-	if (returnedValue) {
-        returnedValue = [fieldMapping reverseMapValue:returnedValue] ?: [NSNull null];
-
-		[self setValue:returnedValue forKeyPath:fieldMapping.keyPath inRepresentation:representation];
-	}
-}
-
-+ (void)setValue:(id)value forKeyPath:(NSString *)keyPath inRepresentation:(NSMutableDictionary *)representation {
-	NSArray *keyPathComponents = [keyPath componentsSeparatedByString:@"."];
-	if ([keyPathComponents count] == 1) {
-		[representation setObject:value forKey:keyPath];
-	} else if ([keyPathComponents count] > 1) {
-		NSString *attributeKey = [keyPathComponents lastObject];
-		NSMutableArray *subPaths = [NSMutableArray arrayWithArray:keyPathComponents];
-		[subPaths removeLastObject];
-
-		id currentPath = representation;
-		for (NSString *key in subPaths) {
-			id subPath = [currentPath valueForKey:key];
-			if (subPath == nil) {
-				subPath = [NSMutableDictionary new];
-				[currentPath setValue:subPath forKey:key];
-			}
-			currentPath = subPath;
-		}
-		[currentPath setValue:value forKey:attributeKey];
-	}
-}
-
-+ (void)setRelationshipObjectOn:(NSMutableDictionary *)representation
-                   usingMapping:(FEMRelationship *)relationshipMapping
-			         fromObject:(id)object {
-	id value = [object valueForKey:relationshipMapping.property];
-	if (value) {
-		id relationshipRepresentation = nil;
-		if (relationshipMapping.isToMany) {
-			relationshipRepresentation = [self _serializeCollection:value usingMapping:relationshipMapping.mapping];
-		} else {
-			relationshipRepresentation = [self _serializeObject:value usingMapping:relationshipMapping.mapping];
-		}
-
-		if (relationshipMapping.keyPath.length > 0) {
-			[representation setObject:relationshipRepresentation forKey:relationshipMapping.keyPath];
-		} else {
-			NSParameterAssert([relationshipRepresentation isKindOfClass:NSDictionary.class]);
-			[representation addEntriesFromDictionary:relationshipRepresentation];
-		}
-	}
-}
-
-@end

+ 0 - 20
Benchmark/Vendor/FastEasyMapping/Core/Store/FEMManagedObjectStore.h

@@ -1,20 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMObjectStore.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class NSManagedObjectContext;
-
-@interface FEMManagedObjectStore : FEMObjectStore
-
-- (instancetype)init NS_UNAVAILABLE;
-
-- (instancetype)initWithContext:(NSManagedObjectContext *)context NS_DESIGNATED_INITIALIZER;
-@property (nonatomic, strong, readonly) NSManagedObjectContext *context;
-
-@property (nonatomic) BOOL saveContextOnCommit;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 89
Benchmark/Vendor/FastEasyMapping/Core/Store/FEMManagedObjectStore.m

@@ -1,89 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMManagedObjectStore.h"
-
-#import <CoreData/CoreData.h>
-
-#import "FEMManagedObjectMapping.h"
-#import "FEMManagedObjectCache.h"
-
-__attribute__((always_inline)) void validateMapping(FEMMapping *mapping) {
-    NSCAssert(mapping.entityName != nil, @"Entity name can't be nil. Please, use -[FEMMapping initWithEntityName:]");
-}
-
-@implementation FEMManagedObjectStore {
-    FEMManagedObjectCache *_cache;
-}
-
-#pragma mark - Init
-
-- (instancetype)initWithContext:(NSManagedObjectContext *)context {
-    NSParameterAssert(context != nil);
-    self = [super init];
-    if (self) {
-        _context = context;
-    }
-
-    return self;
-}
-
-#pragma mark - Transaction
-
-- (void)prepareTransactionForMapping:(nonnull FEMMapping *)mapping ofRepresentation:(nonnull NSArray *)representation {
-    _cache = [[FEMManagedObjectCache alloc] initWithMapping:mapping representation:representation context:self.context];
-}
-
-- (void)beginTransaction {}
-
-- (NSError *)commitTransaction {
-    _cache = nil;
-
-    NSError *error = nil;
-    if (self.saveContextOnCommit && self.context.hasChanges && ![self.context save:&error]) {
-        return error;
-    }
-
-    return nil;
-}
-
-
-
-- (id)newObjectForMapping:(FEMMapping *)mapping {
-    validateMapping(mapping);
-
-    NSString *entityName = [mapping entityName];
-    return [NSEntityDescription insertNewObjectForEntityForName:entityName inManagedObjectContext:self.context];
-}
-
-- (id)registeredObjectForRepresentation:(id)representation mapping:(FEMMapping *)mapping {
-    validateMapping(mapping);
-
-    return [_cache existingObjectForRepresentation:representation mapping:mapping];
-}
-
-- (void)registerObject:(id)object forMapping:(FEMMapping *)mapping {
-    validateMapping(mapping);
-
-    [_cache addExistingObject:object mapping:mapping];
-}
-
-- (NSDictionary *)registeredObjectsForMapping:(FEMMapping *)mapping {
-    validateMapping(mapping);
-
-    return [_cache existingObjectsForMapping:mapping];
-}
-
-- (BOOL)canRegisterObject:(id)object forMapping:(FEMMapping *)mapping {
-    validateMapping(mapping);
-
-    return mapping.primaryKey != nil && [object isInserted];
-}
-
-#pragma mark - FEMRelationshipAssignmentContextDelegate
-
-- (void)assignmentContext:(FEMRelationshipAssignmentContext *)context deletedObject:(id)object {
-    NSAssert([object isKindOfClass:NSManagedObject.class], @"Wrong class");
-    [self.context deleteObject:object];
-}
-
-@end

+ 0 - 24
Benchmark/Vendor/FastEasyMapping/Core/Store/FEMObjectStore.h

@@ -1,24 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-
-#import "FEMRelationshipAssignmentContext.h"
-
-@class FEMMapping;
-
-@interface FEMObjectStore : NSObject <FEMRelationshipAssignmentContextDelegate>
-
-- (void)prepareTransactionForMapping:(nonnull FEMMapping *)mapping ofRepresentation:(nonnull NSArray *)representation;
-- (void)beginTransaction;
-- (nullable NSError *)commitTransaction;
-
-- (nonnull id)newObjectForMapping:(nonnull FEMMapping *)mapping;
-- (nonnull FEMRelationshipAssignmentContext *)newAssignmentContext;
-
-- (void)registerObject:(nonnull id)object forMapping:(nonnull FEMMapping *)mapping;
-- (BOOL)canRegisterObject:(nonnull id)object forMapping:(nonnull FEMMapping *)mapping;
-
-- (nonnull NSDictionary *)registeredObjectsForMapping:(nonnull FEMMapping *)mapping;
-- (nullable id)registeredObjectForRepresentation:(nonnull id)representation mapping:(nonnull FEMMapping *)mapping;
-
-@end

+ 0 - 48
Benchmark/Vendor/FastEasyMapping/Core/Store/FEMObjectStore.m

@@ -1,48 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMObjectStore.h"
-#import "FEMMapping.h"
-
-@implementation FEMObjectStore
-
-- (void)prepareTransactionForMapping:(nonnull FEMMapping *)mapping ofRepresentation:(nonnull NSArray *)representation {}
-
-- (void)beginTransaction {}
-
-- (NSError *)commitTransaction {
-    return nil;
-}
-
-- (id)newObjectForMapping:(FEMMapping *)mapping {
-    id object = [[mapping.objectClass alloc] init];
-    return object;
-}
-
-- (FEMRelationshipAssignmentContext *)newAssignmentContext {
-    FEMRelationshipAssignmentContext *context = [[FEMRelationshipAssignmentContext alloc] initWithStore:self];
-    return context;
-}
-
-- (void)registerObject:(id)object forMapping:(FEMMapping *)mapping {
-    // no-op
-}
-
-- (BOOL)canRegisterObject:(id)object forMapping:(FEMMapping *)mapping {
-    return mapping.primaryKeyAttribute != nil;
-}
-
-- (NSDictionary *)registeredObjectsForMapping:(FEMMapping *)mapping {
-    return nil;
-}
-
-- (id)registeredObjectForRepresentation:(id)representation mapping:(FEMMapping *)mapping {
-    return nil;
-}
-
-#pragma mark - FEMRelationshipAssignmentContextDelegate
-
-- (void)assignmentContext:(FEMRelationshipAssignmentContext *)context deletedObject:(id)object {
-    // no-op
-}
-
-@end

+ 0 - 30
Benchmark/Vendor/FastEasyMapping/Extensions/Collection/FEMExcludableCollection.h

@@ -1,30 +0,0 @@
-//
-// Created by zen on 19/06/14.
-// Copyright (c) 2014 Yalantis. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@protocol FEMExcludableCollection <NSObject>
-@required
-- (id)collectionByExcludingObjects:(id)objects;
-
-@end
-
-@interface NSArray (FEMExcludableCollection) <FEMExcludableCollection>
-
-- (NSArray *)collectionByExcludingObjects:(NSArray *)objects;
-
-@end
-
-@interface NSSet (FEMExcludableCollection) <FEMExcludableCollection>
-
-- (NSSet *)collectionByExcludingObjects:(NSSet *)objects;
-
-@end
-
-@interface NSOrderedSet (FEMExcludableCollection) <FEMExcludableCollection>
-
-- (NSOrderedSet *)collectionByExcludingObjects:(NSOrderedSet *)objects;
-
-@end

+ 0 - 61
Benchmark/Vendor/FastEasyMapping/Extensions/Collection/FEMExcludableCollection.m

@@ -1,61 +0,0 @@
-//
-// Created by zen on 19/06/14.
-// Copyright (c) 2014 Yalantis. All rights reserved.
-//
-
-#import "FEMExcludableCollection.h"
-
-
-@implementation NSArray (FEMExcludableCollection)
-
-- (NSArray *)collectionByExcludingObjects:(NSArray *)array {
-    return [[self mutableCopy] collectionByExcludingObjects:array];
-}
-
-@end
-
-@implementation NSMutableArray (FEMExcludableCollection)
-
-- (NSArray *)collectionByExcludingObjects:(NSArray *)objects {
-    [self removeObjectsInArray:objects];
-
-    return self;
-}
-
-@end
-
-@implementation NSSet (FEMExcludableCollection)
-
-- (NSSet *)collectionByExcludingObjects:(id)set {
-    return [[self mutableCopy] collectionByExcludingObjects:set];
-}
-
-@end
-
-@implementation NSMutableSet (FEMExcludableCollection)
-
-- (NSSet *)collectionByExcludingObjects:(NSSet *)set {
-    [self minusSet:set];
-
-    return self;
-}
-
-@end
-
-@implementation NSOrderedSet (FEMExcludableCollection)
-
-- (NSOrderedSet *)collectionByExcludingObjects:(NSOrderedSet *)objects {
-    return [[self mutableCopy] collectionByExcludingObjects:objects];
-}
-
-@end
-
-@implementation NSMutableOrderedSet (FEMExcludableCollection)
-
-- (NSOrderedSet *)collectionByExcludingObjects:(NSOrderedSet *)objects {
-    [self minusOrderedSet:objects];
-
-    return self;
-}
-
-@end

+ 0 - 30
Benchmark/Vendor/FastEasyMapping/Extensions/Collection/FEMMergeableCollection.h

@@ -1,30 +0,0 @@
-//
-// Created by zen on 12/08/14.
-// Copyright (c) 2014 Yalantis. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@protocol FEMMergeableCollection <NSObject>
-@required
-- (id)collectionByMergingObjects:(id)object;
-
-@end
-
-@interface NSArray (FEMMergeableCollection) <FEMMergeableCollection>
-
-- (NSArray *)collectionByMergingObjects:(NSArray *)object;
-
-@end
-
-@interface NSSet (FEMMergeableCollection) <FEMMergeableCollection>
-
-- (NSSet *)collectionByMergingObjects:(NSSet *)object;
-
-@end
-
-@interface NSOrderedSet (FEMMergeableCollection) <FEMMergeableCollection>
-
-- (NSOrderedSet *)collectionByMergingObjects:(NSOrderedSet *)object;
-
-@end

+ 0 - 65
Benchmark/Vendor/FastEasyMapping/Extensions/Collection/FEMMergeableCollection.m

@@ -1,65 +0,0 @@
-//
-// Created by zen on 12/08/14.
-// Copyright (c) 2014 Yalantis. All rights reserved.
-//
-
-#import "FEMMergeableCollection.h"
-
-@implementation NSArray (FEMMergeableCollection)
-
-- (NSArray *)collectionByMergingObjects:(NSArray *)array {
-    return [[self mutableCopy] collectionByMergingObjects:array];
-}
-
-@end
-
-@implementation NSMutableArray (FEMMergeableCollection)
-
-- (NSArray *)collectionByMergingObjects:(NSArray *)array {
-    if (array.count == 0) return self;
-
-    NSMutableSet *appendingObjectsSet = [[NSMutableSet alloc] initWithArray:array];
-    [appendingObjectsSet minusSet:[NSSet setWithArray:self]];
-
-    [self addObjectsFromArray:[appendingObjectsSet allObjects]];
-
-    return self;
-}
-
-@end
-
-@implementation NSSet (FEMMergeableCollection)
-
-- (NSSet *)collectionByMergingObjects:(NSSet *)set {
-    return [[self mutableCopy] collectionByMergingObjects:set];
-}
-
-@end
-
-@implementation NSMutableSet (FEMMergeableCollection)
-
-- (NSSet *)collectionByMergingObjects:(NSSet *)set {
-    [self unionSet:set];
-
-    return self;
-}
-
-@end
-
-@implementation NSOrderedSet (FEMMergeableCollection)
-
-- (NSOrderedSet *)collectionByMergingObjects:(NSOrderedSet *)orderedSet {
-    return [[self mutableCopy] collectionByMergingObjects:orderedSet];
-}
-
-@end
-
-@implementation NSMutableOrderedSet (FEMMergeableCollection)
-
-- (NSOrderedSet *)collectionByMergingObjects:(NSOrderedSet *)orderedSet {
-    [self unionOrderedSet:orderedSet];
-
-    return self;
-}
-
-@end

+ 0 - 10
Benchmark/Vendor/FastEasyMapping/Extensions/Foundation/NSArray+FEMPropertyRepresentation.h

@@ -1,10 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-#import <objc/runtime.h>
-
-@interface NSArray (FEMPropertyRepresentation)
-
-- (id)fem_propertyRepresentation:(objc_property_t)property;
-
-@end

+ 0 - 32
Benchmark/Vendor/FastEasyMapping/Extensions/Foundation/NSArray+FEMPropertyRepresentation.m

@@ -1,32 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "NSArray+FEMPropertyRepresentation.h"
-
-#import "FEMTypeIntrospection.h"
-
-@implementation NSArray (FEMPropertyRepresentation)
-
-- (id)fem_propertyRepresentation:(objc_property_t)property {
-	id convertedObject = self;
-	if (property) {
-		NSString *type = FEMPropertyTypeStringRepresentation(property);
-		if ([type isEqualToString:@"NSSet"]) {
-			convertedObject = [NSSet setWithArray:self];
-		}
-		else if ([type isEqualToString:@"NSMutableSet"]) {
-			convertedObject = [NSMutableSet setWithArray:self];
-		}
-		else if ([type isEqualToString:@"NSOrderedSet"]) {
-			convertedObject = [NSOrderedSet orderedSetWithArray:self];
-		}
-		else if ([type isEqualToString:@"NSMutableOrderedSet"]) {
-			convertedObject = [NSMutableOrderedSet orderedSetWithArray:self];
-		}
-		else if ([type isEqualToString:@"NSMutableArray"]) {
-			convertedObject = [NSMutableArray arrayWithArray:self];
-		}
-	}
-	return convertedObject;
-}
-
-@end

+ 0 - 9
Benchmark/Vendor/FastEasyMapping/Extensions/Foundation/NSObject+FEMKVCExtension.h

@@ -1,9 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-
-@interface NSObject (FEMKVCExtension)
-
-- (void)fem_setValueIfDifferent:(id)value forKey:(NSString *)key;
-
-@end

+ 0 - 15
Benchmark/Vendor/FastEasyMapping/Extensions/Foundation/NSObject+FEMKVCExtension.m

@@ -1,15 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "NSObject+FEMKVCExtension.h"
-
-@implementation NSObject (FEMKVCExtension)
-
-- (void)fem_setValueIfDifferent:(id)value forKey:(NSString *)key {
-	id _value = [self valueForKey:key];
-
-	if (_value != value && ![_value isEqual:value]) {
-		[self setValue:value forKey:key];
-	}
-}
-
-@end

+ 0 - 29
Benchmark/Vendor/FastEasyMapping/FastEasyMapping.h

@@ -1,29 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#ifndef _FASTEASYMAPPING_
-#define _FASTEASYMAPPING_
-
-#import "FEMProperty.h"
-#import "FEMAttribute.h"
-#import "FEMRelationship.h"
-
-#import "FEMObjectStore.h"
-#import "FEMManagedObjectStore.h"
-
-#import "FEMMapping.h"
-#import "FEMObjectMapping.h"
-#import "FEMManagedObjectMapping.h"
-
-#import "FEMDeserializer.h"
-#import "FEMObjectDeserializer.h"
-#import "FEMManagedObjectDeserializer.h"
-#import "FEMSerializer.h"
-
-#import "FEMRelationshipAssignmentContext.h"
-#import "FEMAssignmentPolicy.h"
-
-#import "FEMTypes.h"
-#import "FEMRepresentationUtility.h"
-#import "FEMMappingUtility.h"
-
-#endif /* _FASTEASYMAPPING_ */

+ 0 - 11
Benchmark/Vendor/FastEasyMapping/Utility/FEMMappingUtility.h

@@ -1,11 +0,0 @@
-//
-// Created by zen on 14/05/15.
-// Copyright (c) 2015 Yalantis. All rights reserved.
-//
-
-@import Foundation;
-
-@class FEMMapping;
-
-FOUNDATION_EXTERN void FEMMappingApply(FEMMapping *mapping, void (^apply)(FEMMapping *object));
-FOUNDATION_EXTERN NSSet * FEMMappingCollectUsedEntityNames(FEMMapping *mapping);

+ 0 - 26
Benchmark/Vendor/FastEasyMapping/Utility/FEMMappingUtility.m

@@ -1,26 +0,0 @@
-//
-// Created by zen on 14/05/15.
-// Copyright (c) 2015 Yalantis. All rights reserved.
-//
-
-#import "FEMMappingUtility.h"
-#import "FEMMapping.h"
-
-void FEMMappingApply(FEMMapping *mapping, void (^apply)(FEMMapping *object)) {
-    apply(mapping);
-
-    for (FEMRelationship *relationship in mapping.relationships) {
-        FEMMappingApply(relationship.mapping, apply);
-    }
-}
-
-NSSet * FEMMappingCollectUsedEntityNames(FEMMapping *mapping) {
-    NSMutableSet *output = [[NSMutableSet alloc] init];
-    FEMMappingApply(mapping, ^(FEMMapping *object) {
-        NSCParameterAssert(object.entityName != nil);
-
-        [output addObject:object.entityName];
-    });
-
-    return output;
-}

+ 0 - 14
Benchmark/Vendor/FastEasyMapping/Utility/FEMRepresentationUtility.h

@@ -1,14 +0,0 @@
-//
-// Created by zen on 12/05/15.
-// Copyright (c) 2015 Yalantis. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@class FEMMapping, FEMAttribute;
-
-FOUNDATION_EXTERN id FEMRepresentationRootForKeyPath(id representation, NSString *keyPath);
-
-FOUNDATION_EXTERN NSDictionary *FEMRepresentationCollectPresentedPrimaryKeys(id representation, FEMMapping *mapping);
-
-FOUNDATION_EXTERN id FEMRepresentationValueForAttribute(id representation, FEMAttribute *attribute);

+ 0 - 79
Benchmark/Vendor/FastEasyMapping/Utility/FEMRepresentationUtility.m

@@ -1,79 +0,0 @@
-//
-// Created by zen on 12/05/15.
-// Copyright (c) 2015 Yalantis. All rights reserved.
-//
-
-#import "FEMRepresentationUtility.h"
-#import "FEMMapping.h"
-#import "FEMMappingUtility.h"
-#import "FEMAttribute.h"
-
-id FEMRepresentationRootForKeyPath(id representation, NSString *keyPath) {
-    if (keyPath.length > 0) {
-        return [representation valueForKeyPath:keyPath];
-    }
-
-    return representation;
-}
-
-void _FEMRepresentationCollectPresentedPrimaryKeys(id, FEMMapping *, NSDictionary *);
-
-void _FEMRepresentationCollectObjectPrimaryKeys(NSDictionary *object, FEMMapping *mapping, NSDictionary *container) {
-    if (mapping.primaryKey) {
-        FEMAttribute *primaryKeyMapping = mapping.primaryKeyAttribute;
-        id primaryKeyValue = FEMRepresentationValueForAttribute(object, primaryKeyMapping);
-        if (primaryKeyValue && primaryKeyValue != NSNull.null) {
-            NSMutableSet *set = container[mapping.entityName];
-            [set addObject:primaryKeyValue];
-        }
-    }
-
-    for (FEMRelationship *relationship in mapping.relationships) {
-        id relationshipRepresentation = FEMRepresentationRootForKeyPath(object, relationship.keyPath);
-        if (relationshipRepresentation && relationshipRepresentation != NSNull.null) {
-            _FEMRepresentationCollectPresentedPrimaryKeys(relationshipRepresentation, relationship.mapping, container);
-        }
-    }
-}
-
-void _FEMRepresentationCollectPresentedPrimaryKeys(id representation, FEMMapping *mapping, NSDictionary *container) {
-    if ([representation isKindOfClass:NSArray.class]) {
-        for (id object in (id<NSFastEnumeration>)representation) {
-            _FEMRepresentationCollectObjectPrimaryKeys(object, mapping, container);
-        }
-    } else if ([representation isKindOfClass:NSDictionary.class] || [representation isKindOfClass:[NSNumber class]] || [representation isKindOfClass:[NSString class]]) {
-        _FEMRepresentationCollectObjectPrimaryKeys(representation, mapping, container);
-    } else {
-        NSCAssert(
-            NO,
-            @"Expected container classes: NSArray, NSDictionary, NSNumber or NSString. Got:%@",
-            NSStringFromClass([representation class])
-        );
-    }
-};
-NSDictionary *FEMRepresentationCollectPresentedPrimaryKeys(id representation, FEMMapping *mapping) {
-    FEMMappingApply(mapping, ^(FEMMapping *object) {
-        NSCParameterAssert(object.entityName != nil);
-    });
-
-    NSMutableDictionary *output = [[NSMutableDictionary alloc] init];
-    for (NSString *name in FEMMappingCollectUsedEntityNames(mapping)) {
-        output[name] = [[NSMutableSet alloc] init];
-    }
-
-    id root = FEMRepresentationRootForKeyPath(representation, mapping.rootPath);
-    _FEMRepresentationCollectPresentedPrimaryKeys(root, mapping, output);
-
-    return output;
-}
-
-id FEMRepresentationValueForAttribute(id representation, FEMAttribute *attribute) {
-    id value = attribute.keyPath ? [representation valueForKeyPath:attribute.keyPath] : representation;
-    // nil is a valid value for missing keys. therefore attribute is discarded
-    if (value != nil) {
-        // if by mistake nil returned we still have to map it to the NSNull to indicate missing value
-        return [attribute mapValue:value] ?: [NSNull null];
-    }
-
-    return value;
-}

+ 0 - 8
Benchmark/Vendor/FastEasyMapping/Utility/FEMTypeIntrospection.h

@@ -1,8 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import <Foundation/Foundation.h>
-#import <objc/runtime.h>
-
-extern BOOL FEMObjectPropertyTypeIsScalar(id object, NSString *propertyName);
-
-extern NSString * FEMPropertyTypeStringRepresentation(objc_property_t property);

+ 0 - 36
Benchmark/Vendor/FastEasyMapping/Utility/FEMTypeIntrospection.m

@@ -1,36 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-
-#import "FEMTypeIntrospection.h"
-#import <objc/runtime.h>
-
-static const char ScalarTypeEncodings[] = {
-	_C_BOOL, _C_BFLD,          // BOOL
-	_C_CHR, _C_UCHR,           // char, unsigned char
-	_C_SHT, _C_USHT,           // short, unsigned short
-	_C_INT, _C_UINT,           // int, unsigned int, NSInteger, NSUInteger
-	_C_LNG, _C_ULNG,           // long, unsigned long
-	_C_LNG_LNG, _C_ULNG_LNG,   // long long, unsigned long long
-	_C_FLT, _C_DBL,            // float, CGFloat, double
-	0
-};
-
-BOOL FEMObjectPropertyTypeIsScalar(id object, NSString *propertyName) {
-	objc_property_t property = class_getProperty(object_getClass(object), [propertyName UTF8String]);
-	NSString *type = property ? FEMPropertyTypeStringRepresentation(property) : nil;
-
-	return (type.length == 1) && (NSNotFound != [@(ScalarTypeEncodings) rangeOfString:type].location);
-}
-
-NSString * FEMPropertyTypeStringRepresentation(objc_property_t property) {
-	const char *TypeAttribute = "T";
-	char *type = property_copyAttributeValue(property, TypeAttribute);
-	NSString *propertyType = (type[0] != _C_ID) ? @(type) : ({
-		(type[1] == 0) ? @"id" : ({
-			// Modern format of a type attribute (e.g. @"NSSet")
-			type[strlen(type) - 1] = 0;
-			@(type + 2);
-		});
-	});
-	free(type);
-	return propertyType;
-}

+ 0 - 4
Benchmark/Vendor/FastEasyMapping/Utility/FEMTypes.h

@@ -1,4 +0,0 @@
-// For License please refer to LICENSE file in the root of FastEasyMapping project
-#import <Foundation/Foundation.h>
-
-typedef __nullable id (^FEMMapBlock)(__nonnull id value);

+ 0 - 350
Benchmark/Vendor/JSONModel/JSONModel/JSONModel.h

@@ -1,350 +0,0 @@
-//
-//  JSONModel.h
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import <Foundation/Foundation.h>
-
-#import "JSONModelError.h"
-#import "JSONValueTransformer.h"
-#import "JSONKeyMapper.h"
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-#if TARGET_IPHONE_SIMULATOR
-#define JMLog( s, ... ) NSLog( @"[%@:%d] %@", [[NSString stringWithUTF8String:__FILE__] \
-lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
-#else
-#define JMLog( s, ... )
-#endif
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-#pragma mark - Property Protocols
-/**
- * Protocol for defining properties in a JSON Model class that should not be considered at all
- * neither while importing nor when exporting JSON.
- *
- * @property (strong, nonatomic) NSString&lt;Ignore&gt;* propertyName;
- *
- */
-@protocol Ignore
-@end
-
-/**
- * Protocol for defining optional properties in a JSON Model class. Use like below to define 
- * model properties that are not required to have values in the JSON input:
- * 
- * @property (strong, nonatomic) NSString&lt;Optional&gt;* propertyName;
- *
- */
-@protocol Optional
-@end
-
-/**
- * Protocol for defining index properties in a JSON Model class. Use like below to define
- * model properties that are considered the Model's identifier (id).
- *
- * @property (strong, nonatomic) NSString&lt;Index&gt;* propertyName;
- *
- */
-@protocol Index
-@end
-
-/**
- * Make all objects Optional compatible to avoid compiler warnings
- */
-@interface NSObject(JSONModelPropertyCompatibility)<Optional, Index, Ignore>
-@end
-
-/**
- * ConvertOnDemand enables lazy model initialization for NSArrays of models
- *
- * @property (strong, nonatomic) NSArray&lt;JSONModel, ConvertOnDemand&gt;* propertyName;
- */
-@protocol ConvertOnDemand
-@end
-
-/**
- * Make all arrays ConvertOnDemand compatible to avoid compiler warnings
- */
-@interface NSArray(JSONModelPropertyCompatibility)<ConvertOnDemand>
-@end
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark - JSONModel protocol
-/**
- * A protocol describing an abstract JSONModel class
- * JSONModel conforms to this protocol, so it can use itself abstractly
- */
-@protocol AbstractJSONModelProtocol <NSCopying, NSCoding>
-
-@required
-  /**
-   * All JSONModel classes should implement initWithDictionary:
-   *
-   * For most classes the default initWithDictionary: inherited from JSONModel itself
-   * should suffice, but developers have the option ot also overwrite it if needed.
-   *
-   * @param dict a dictionary holding JSON objects, to be imported in the model.
-   * @param err an error or NULL
-   */
-  -(instancetype)initWithDictionary:(NSDictionary*)dict error:(NSError**)err;
-
-
-/**
- * All JSONModel classes should implement initWithData:error:
- *
- * For most classes the default initWithData: inherited from JSONModel itself
- * should suffice, but developers have the option ot also overwrite it if needed.
- *
- * @param data representing a JSON response (usually fetched from web), to be imported in the model.
- * @param error an error or NULL
- */
--(instancetype)initWithData:(NSData*)data error:(NSError**)error;
-
-/**
- * All JSONModel classes should be able to export themselves as a dictionary of
- * JSON compliant objects.
- *
- * For most classes the inherited from JSONModel default toDictionary implementation
- * should suffice.
- *
- * @return NSDictionary dictionary of JSON compliant objects
- * @exception JSONModelTypeNotAllowedException thrown when one of your model's custom class properties
- * does not have matching transformer method in an JSONValueTransformer.
- */
-  -(NSDictionary*)toDictionary;
-
-  /**
-   * Export a model class to a dictionary, including only given properties
-   *
-   * @param propertyNames the properties to export; if nil, all properties exported
-   * @return NSDictionary dictionary of JSON compliant objects
-   * @exception JSONModelTypeNotAllowedException thrown when one of your model's custom class properties 
-   * does not have matching transformer method in an JSONValueTransformer.
-   */
-  -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames;
-@end
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark - JSONModel interface
-/**
- * The JSONModel is an abstract model class, you should not instantiate it directly,
- * as it does not have any properties, and therefore cannot serve as a data model.
- * Instead you should subclass it, and define the properties you want your data model
- * to have as properties of your own class.
- */
-@interface JSONModel : NSObject <AbstractJSONModelProtocol, NSSecureCoding>
-
-/** @name Creating and initializing models */
-
-  /**
-   * Create a new model instance and initialize it with the JSON from a text parameter. The method assumes UTF8 encoded input text.
-   * @param string JSON text data
-   * @param err an initialization error or nil
-   * @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON,
-   * or a property type in your model is not supported by JSONValueTransformer and its categories
-   * @see initWithString:usingEncoding:error: for use of custom text encodings
-   */
-  -(instancetype)initWithString:(NSString*)string error:(JSONModelError**)err;
-
-  /**
-   * Create a new model instance and initialize it with the JSON from a text parameter using the given encoding.
-   * @param string JSON text data
-   * @param encoding the text encoding to use when parsing the string (see NSStringEncoding)
-   * @param err an initialization error or nil
-   * @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON,
-   * or a property type in your model is not supported by JSONValueTransformer and its categories
-   */
-  -(instancetype)initWithString:(NSString *)string usingEncoding:(NSStringEncoding)encoding error:(JSONModelError**)err;
-
-  -(instancetype)initWithDictionary:(NSDictionary*)dict error:(NSError **)err;
-
-  -(instancetype)initWithData:(NSData *)data error:(NSError **)error;
-
-/** @name Exporting model contents */
-
-  /**
-   * Export the whole object to a dictionary
-   * @return dictionary containing the data model
-   */
-  -(NSDictionary*)toDictionary;
-
-  /**
-   * Export the whole object to a JSON data text string
-   * @return JSON text describing the data model
-   */
-  -(NSString*)toJSONString;
-
-  /**
-   * Export the whole object to a JSON data text string
-   * @return JSON text data describing the data model
-   */
-  -(NSData*)toJSONData;
-
-  /**
-   * Export the specified properties of the object to a dictionary
-   * @param propertyNames the properties to export; if nil, all properties exported
-   * @return dictionary containing the data model
-   */
-  -(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames;
-
-  /**
-   * Export the specified properties of the object to a JSON data text string
-   * @param propertyNames the properties to export; if nil, all properties exported
-   * @return JSON text describing the data model
-   */
-  -(NSString*)toJSONStringWithKeys:(NSArray*)propertyNames;
-
-  /**
-   * Export the specified properties of the object to a JSON data text string
-   * @param propertyNames the properties to export; if nil, all properties exported
-   * @return JSON text data describing the data model
-   */
-  -(NSData*)toJSONDataWithKeys:(NSArray*)propertyNames;
-
-/** @name Batch methods */
-
-  /**
-   * If you have a list of dictionaries in a JSON feed, you can use this method to create an NSArray
-   * of model objects. Handy when importing JSON data lists.
-   * This method will loop over the input list and initialize a data model for every dictionary in the list.
-   *
-   * @param array list of dictionaries to be imported as models
-   * @return list of initialized data model objects
-   * @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON,
-   * or a property type in your model is not supported by JSONValueTransformer and its categories
-   * @exception JSONModelInvalidDataException thrown when the input data does not include all required keys
-   * @see arrayOfDictionariesFromModels:
-   */
-  +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array __attribute__((deprecated("use arrayOfModelsFromDictionaries:error:")));
-  +(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array error:(NSError**)err;
-  +(NSMutableArray*)arrayOfModelsFromData:(NSData*)data error:(NSError**)err;
-  +(NSMutableArray*)arrayOfModelsFromString:(NSString*)string error:(NSError**)err;
-  +(NSMutableDictionary*)dictionaryOfModelsFromDictionary:(NSDictionary*)dictionary error:(NSError**)err;
-  +(NSMutableDictionary*)dictionaryOfModelsFromData:(NSData*)data error:(NSError**)err;
-  +(NSMutableDictionary*)dictionaryOfModelsFromString:(NSString*)string error:(NSError**)err;
-
-  /**
-   * If you have an NSArray of data model objects, this method takes it in and outputs a list of the 
-   * matching dictionaries. This method does the opposite of arrayOfObjectsFromDictionaries:
-   * @param array list of JSONModel objects
-   * @return a list of NSDictionary objects
-   * @exception JSONModelTypeNotAllowedException thrown when unsupported type is found in the incoming JSON,
-   * or a property type in your model is not supported by JSONValueTransformer and its categories
-   * @see arrayOfModelsFromDictionaries:
-   */
-  +(NSMutableArray*)arrayOfDictionariesFromModels:(NSArray*)array;
-  +(NSMutableDictionary*)dictionaryOfDictionariesFromModels:(NSDictionary*)dictionary;
-
-/** @name Comparing models */
-
-  /**
-   * The name of the model's property, which is considered the model's unique identifier.
-   * You can define Index property by using the Index protocol:
-   * @property (strong, nonatomic) NSString&lt;Index&gt;* id;
-   */
-  -(NSString*)indexPropertyName;
-
-  /**
-   * Overridden NSObject method to compare model objects. Compares the &lt;Index&gt; property of the two models,
-   * if an index property is defined.
-   * @param object a JSONModel instance to compare to for equality
-   */
-  -(BOOL)isEqual:(id)object;
-
-  /**
-   * Comparison method, which uses the defined &lt;Index&gt; property of the two models, to compare them.
-   * If there isn't an index property throws an exception. If the Index property does not have a compare: method
-   * also throws an exception. NSString and NSNumber have compare: methods, and in case the Index property is 
-   * a another custom class, the programmer should create a custom compare: method then.
-   * @param object a JSONModel instance to compare to
-   */
-  -(NSComparisonResult)compare:(id)object;
-
-/** @name Validation */
-
-  /**
-   * Overwrite the validate method in your own models if you need to perform some custom validation over the model data.
-   * This method gets called at the very end of the JSONModel initializer, thus the model is in the state that you would
-   * get it back when initialized. Check the values of any property that needs to be validated and if any invalid values
-   * are encountered return NO and set the error parameter to an NSError object. If the model is valid return YES.
-   *
-   * NB: Only setting the error parameter is not enough to fail the validation, you also need to return a NO value.
-   *
-   * @param error a pointer to an NSError object, to pass back an error if needed
-   * @return a BOOL result, showing whether the model data validates or not. You can use the convenience method
-   * [JSONModelError errorModelIsInvalid] to set the NSError param if the data fails your custom validation
-   */
--(BOOL)validate:(NSError**)error;
-
-/** @name Key mapping */
-  /**
-   * Overwrite in your models if your property names don't match your JSON key names.
-   * Lookup JSONKeyMapper docs for more details.
-   */
-+(JSONKeyMapper*)keyMapper;
-
-/**
- * Sets a key mapper which affects ALL the models in your project. Use this if you need only one mapper to work
- * with your API. For example if you are using the [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase] it is more
- * likely that you will need to use it with ALL of your models.
- * NB: Custom key mappers take precedence over the global key mapper.
- * @param globalKeyMapper a key mapper to apply to all models in your project.
- *
- * Lookup JSONKeyMapper docs for more details.
- */
-+(void)setGlobalKeyMapper:(JSONKeyMapper*)globalKeyMapper;
-
-/**
- * Indicates whether the property with the given name is Optional.
- * To have a model with all of its properties being Optional just return YES.
- * This method returns by default NO, since the default behaviour is to have all properties required.
- * @param propertyName the name of the property
- * @return a BOOL result indicating whether the property is optional
- */
-+(BOOL)propertyIsOptional:(NSString*)propertyName;
-
-/**
- * Indicates whether the property with the given name is Ignored.
- * To have a model with all of its properties being Ignored just return YES.
- * This method returns by default NO, since the default behaviour is to have all properties required.
- * @param propertyName the name of the property
- * @return a BOOL result indicating whether the property is ignored
- */
-+(BOOL)propertyIsIgnored:(NSString*)propertyName;
-
-/**
- * Indicates the protocol name for an array property.
- * Rather than using:
- *     @property (strong) NSArray<MyType>* things;
- * You can implement protocolForArrayProperty: and keep your property 
- * defined like:
- *     @property (strong) NSArray* things;
- * @param propertyName the name of the property
- * @return an NSString result indicating the name of the protocol/class
- * that should be contained in this array property. Return nil to indicate
- * no contained protocol.
- */
-+(NSString*)protocolForArrayProperty:(NSString *)propertyName;
-
-/**
- * Merges values from the given dictionary into the model instance.
- * @param dict dictionary with values
- * @param useKeyMapping if YES the method will use the model's key mapper and the global key mapper, if NO 
- * it'll just try to match the dictionary keys to the model's properties
- */
-- (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping __attribute__((deprecated("use mergeFromDictionary:useKeyMapping:error:")));
-- (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping error:(NSError **)error;
-
-@end

+ 0 - 1396
Benchmark/Vendor/JSONModel/JSONModel/JSONModel.m

@@ -1,1396 +0,0 @@
-//
-//  JSONModel.m
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#if !__has_feature(objc_arc)
-#error The JSONMOdel framework is ARC only, you can enable ARC on per file basis.
-#endif
-
-
-#import <objc/runtime.h>
-#import <objc/message.h>
-
-
-#import "JSONModel.h"
-#import "JSONModelClassProperty.h"
-#import "JSONModelArray.h"
-
-#pragma mark - associated objects names
-static const char * kMapperObjectKey;
-static const char * kClassPropertiesKey;
-static const char * kClassRequiredPropertyNamesKey;
-static const char * kIndexPropertyNameKey;
-
-#pragma mark - class static variables
-static NSArray* allowedJSONTypes = nil;
-static NSArray* allowedPrimitiveTypes = nil;
-static JSONValueTransformer* valueTransformer = nil;
-static Class JSONModelClass = NULL;
-
-#pragma mark - model cache
-static JSONKeyMapper* globalKeyMapper = nil;
-
-#pragma mark - JSONModel implementation
-@implementation JSONModel
-{
-    NSString* _description;
-}
-
-#pragma mark - initialization methods
-
-+(void)load
-{
-    static dispatch_once_t once;
-    dispatch_once(&once, ^{
-        // initialize all class static objects,
-        // which are common for ALL JSONModel subclasses
-        
-		@autoreleasepool {
-            allowedJSONTypes = @[
-                [NSString class], [NSNumber class], [NSDecimalNumber class], [NSArray class], [NSDictionary class], [NSNull class], //immutable JSON classes
-                [NSMutableString class], [NSMutableArray class], [NSMutableDictionary class] //mutable JSON classes
-            ];
-            
-            allowedPrimitiveTypes = @[
-                @"BOOL", @"float", @"int", @"long", @"double", @"short",
-                //and some famous aliases
-                @"NSInteger", @"NSUInteger",
-                @"Block"
-            ];
-
-            valueTransformer = [[JSONValueTransformer alloc] init];
-            
-            // This is quite strange, but I found the test isSubclassOfClass: (line ~291) to fail if using [JSONModel class].
-            // somewhat related: https://stackoverflow.com/questions/6524165/nsclassfromstring-vs-classnamednsstring
-            // //; seems to break the unit tests
-            
-            // Using NSClassFromString instead of [JSONModel class], as this was breaking unit tests, see below
-            //http://stackoverflow.com/questions/21394919/xcode-5-unit-test-seeing-wrong-class
-            JSONModelClass = NSClassFromString(NSStringFromClass(self));
-		}
-    });
-}
-
--(void)__setup__
-{
-    //if first instance of this model, generate the property list
-    if (!objc_getAssociatedObject(self.class, &kClassPropertiesKey)) {
-        [self __inspectProperties];
-    }
-
-    //if there's a custom key mapper, store it in the associated object
-    id mapper = [[self class] keyMapper];
-    if ( mapper && !objc_getAssociatedObject(self.class, &kMapperObjectKey) ) {
-        objc_setAssociatedObject(
-                                 self.class,
-                                 &kMapperObjectKey,
-                                 mapper,
-                                 OBJC_ASSOCIATION_RETAIN // This is atomic
-                                 );
-    }
-}
-
--(id)init
-{
-    self = [super init];
-    if (self) {
-        //do initial class setup
-        [self __setup__];
-    }
-    return self;
-}
-
--(instancetype)initWithData:(NSData *)data error:(NSError *__autoreleasing *)err
-{
-    //check for nil input
-    if (!data) {
-        if (err) *err = [JSONModelError errorInputIsNil];
-        return nil;
-    }
-    //read the json
-    JSONModelError* initError = nil;
-    id obj = [NSJSONSerialization JSONObjectWithData:data
-                                             options:kNilOptions
-                                               error:&initError];
-    
-    if (initError) {
-        if (err) *err = [JSONModelError errorBadJSON];
-        return nil;
-    }
-    
-    //init with dictionary
-    id objModel = [self initWithDictionary:obj error:&initError];
-    if (initError && err) *err = initError;
-    return objModel;
-}
-
--(id)initWithString:(NSString*)string error:(JSONModelError**)err
-{
-    JSONModelError* initError = nil;
-    id objModel = [self initWithString:string usingEncoding:NSUTF8StringEncoding error:&initError];
-    if (initError && err) *err = initError;
-    return objModel;
-}
-
--(id)initWithString:(NSString *)string usingEncoding:(NSStringEncoding)encoding error:(JSONModelError**)err
-{
-    //check for nil input
-    if (!string) {
-        if (err) *err = [JSONModelError errorInputIsNil];
-        return nil;
-    }
-    
-    JSONModelError* initError = nil;
-    id objModel = [self initWithData:[string dataUsingEncoding:encoding] error:&initError];
-    if (initError && err) *err = initError;
-    return objModel;
-
-}
-
--(id)initWithDictionary:(NSDictionary*)dict error:(NSError**)err
-{
-    //check for nil input
-    if (!dict) {
-        if (err) *err = [JSONModelError errorInputIsNil];
-        return nil;
-    }
-
-    //invalid input, just create empty instance
-    if (![dict isKindOfClass:[NSDictionary class]]) {
-        if (err) *err = [JSONModelError errorInvalidDataWithMessage:@"Attempt to initialize JSONModel object using initWithDictionary:error: but the dictionary parameter was not an 'NSDictionary'."];
-        return nil;
-    }
-
-    //create a class instance
-    self = [self init];
-    if (!self) {
-        
-        //super init didn't succeed
-        if (err) *err = [JSONModelError errorModelIsInvalid];
-        return nil;
-    }
-    
-    //check incoming data structure
-    if (![self __doesDictionary:dict matchModelWithKeyMapper:self.__keyMapper error:err]) {
-        return nil;
-    }
-    
-    //import the data from a dictionary
-    if (![self __importDictionary:dict withKeyMapper:self.__keyMapper validation:YES error:err]) {
-        return nil;
-    }
-    
-    //run any custom model validation
-    if (![self validate:err]) {
-        return nil;
-    }
-    
-    //model is valid! yay!
-    return self;
-}
-
--(JSONKeyMapper*)__keyMapper
-{
-    //get the model key mapper
-    return objc_getAssociatedObject(self.class, &kMapperObjectKey);
-}
-
--(BOOL)__doesDictionary:(NSDictionary*)dict matchModelWithKeyMapper:(JSONKeyMapper*)keyMapper error:(NSError**)err
-{
-    //check if all required properties are present
-    NSArray* incomingKeysArray = [dict allKeys];
-    NSMutableSet* requiredProperties = [self __requiredPropertyNames].mutableCopy;
-    NSSet* incomingKeys = [NSSet setWithArray: incomingKeysArray];
-    
-    //transform the key names, if necessary
-    if (keyMapper || globalKeyMapper) {
-        
-        NSMutableSet* transformedIncomingKeys = [NSMutableSet setWithCapacity: requiredProperties.count];
-        NSString* transformedName = nil;
-        
-        //loop over the required properties list
-        for (JSONModelClassProperty* property in [self __properties__]) {
-            
-            transformedName = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper importing:YES] : property.name;
-            
-            //check if exists and if so, add to incoming keys
-            id value;
-            @try {
-                value = [dict valueForKeyPath:transformedName];
-            }
-            @catch (NSException *exception) {
-                value = dict[transformedName];
-            }
-            
-            if (value) {
-                [transformedIncomingKeys addObject: property.name];
-            }
-        }
-        
-        //overwrite the raw incoming list with the mapped key names
-        incomingKeys = transformedIncomingKeys;
-    }
-    
-    //check for missing input keys
-    if (![requiredProperties isSubsetOfSet:incomingKeys]) {
-        
-        //get a list of the missing properties
-        [requiredProperties minusSet:incomingKeys];
-        
-        //not all required properties are in - invalid input
-        JMLog(@"Incoming data was invalid [%@ initWithDictionary:]. Keys missing: %@", self.class, requiredProperties);
-        
-        if (err) *err = [JSONModelError errorInvalidDataWithMissingKeys:requiredProperties];
-        return NO;
-    }
-    
-    //not needed anymore
-    incomingKeys= nil;
-    requiredProperties= nil;
-    
-    return YES;
-}
-
--(NSString*)__mapString:(NSString*)string withKeyMapper:(JSONKeyMapper*)keyMapper importing:(BOOL)importing
-{
-    if (keyMapper) {
-        //custom mapper
-        NSString* mappedName = [keyMapper convertValue:string isImportingToModel:importing];
-        if (globalKeyMapper && [mappedName isEqualToString: string]) {
-            mappedName = [globalKeyMapper convertValue:string isImportingToModel:importing];
-        }
-        string = mappedName;
-    } else if (globalKeyMapper) {
-        //global keymapper
-        string = [globalKeyMapper convertValue:string isImportingToModel:importing];
-    }
-    
-    return string;
-}
-
--(BOOL)__importDictionary:(NSDictionary*)dict withKeyMapper:(JSONKeyMapper*)keyMapper validation:(BOOL)validation error:(NSError**)err
-{
-    //loop over the incoming keys and set self's properties
-    for (JSONModelClassProperty* property in [self __properties__]) {
-        
-        //convert key name ot model keys, if a mapper is provided
-        NSString* jsonKeyPath = (keyMapper||globalKeyMapper) ? [self __mapString:property.name withKeyMapper:keyMapper importing:YES] : property.name;
-        //JMLog(@"keyPath: %@", jsonKeyPath);
-        
-        //general check for data type compliance
-        id jsonValue;
-        @try {
-            jsonValue = [dict valueForKeyPath: jsonKeyPath];
-        }
-        @catch (NSException *exception) {
-            jsonValue = dict[jsonKeyPath];
-        }
-        
-        //check for Optional properties
-        if (isNull(jsonValue)) {
-            //skip this property, continue with next property
-            if (property.isOptional || !validation) continue;
-            
-            if (err) {
-                //null value for required property
-                NSString* msg = [NSString stringWithFormat:@"Value of required model key %@ is null", property.name];
-                JSONModelError* dataErr = [JSONModelError errorInvalidDataWithMessage:msg];
-                *err = [dataErr errorByPrependingKeyPathComponent:property.name];
-            }
-            return NO;
-        }
-        
-        Class jsonValueClass = [jsonValue class];
-        BOOL isValueOfAllowedType = NO;
-        
-        for (Class allowedType in allowedJSONTypes) {
-            if ( [jsonValueClass isSubclassOfClass: allowedType] ) {
-                isValueOfAllowedType = YES;
-                break;
-            }
-        }
-        
-        if (isValueOfAllowedType==NO) {
-            //type not allowed
-            JMLog(@"Type %@ is not allowed in JSON.", NSStringFromClass(jsonValueClass));
-            
-            if (err) {
-				NSString* msg = [NSString stringWithFormat:@"Type %@ is not allowed in JSON.", NSStringFromClass(jsonValueClass)];
-				JSONModelError* dataErr = [JSONModelError errorInvalidDataWithMessage:msg];
-				*err = [dataErr errorByPrependingKeyPathComponent:property.name];
-			}
-            return NO;
-        }
-        
-        //check if there's matching property in the model
-        if (property) {
-            
-            // check for custom setter, than the model doesn't need to do any guessing
-            // how to read the property's value from JSON
-            if ([self __customSetValue:jsonValue forProperty:property]) {
-                //skip to next JSON key
-                continue;
-            };
-            
-            // 0) handle primitives
-            if (property.type == nil && property.structName==nil) {
-                
-                //generic setter
-                if (jsonValue != [self valueForKey:property.name]) {
-                    [self setValue:jsonValue forKey: property.name];
-                }
-                
-                //skip directly to the next key
-                continue;
-            }
-            
-            // 0.5) handle nils
-            if (isNull(jsonValue)) {
-                if ([self valueForKey:property.name] != nil) {
-                    [self setValue:nil forKey: property.name];
-                }
-                continue;
-            }
-            
-            
-            // 1) check if property is itself a JSONModel
-            if ([self __isJSONModelSubClass:property.type]) {
-                
-                //initialize the property's model, store it
-                JSONModelError* initErr = nil;
-                id value = [[property.type alloc] initWithDictionary: jsonValue error:&initErr];
-                
-                if (!value) {
-                    //skip this property, continue with next property
-                    if (property.isOptional || !validation) continue;
-                    
-					// Propagate the error, including the property name as the key-path component
-					if((err != nil) && (initErr != nil))
-					{
-						*err = [initErr errorByPrependingKeyPathComponent:property.name];
-					}
-                    return NO;
-                }
-                if (![value isEqual:[self valueForKey:property.name]]) {
-                    [self setValue:value forKey: property.name];
-                }
-                
-                //for clarity, does the same without continue
-                continue;
-                
-            } else {
-                
-                // 2) check if there's a protocol to the property
-                //  ) might or not be the case there's a built in transform for it
-                if (property.protocol) {
-                    
-                    //JMLog(@"proto: %@", p.protocol);
-                    jsonValue = [self __transform:jsonValue forProperty:property error:err];
-                    if (!jsonValue) {
-                        if ((err != nil) && (*err == nil)) {
-							NSString* msg = [NSString stringWithFormat:@"Failed to transform value, but no error was set during transformation. (%@)", property];
-							JSONModelError* dataErr = [JSONModelError errorInvalidDataWithMessage:msg];
-							*err = [dataErr errorByPrependingKeyPathComponent:property.name];
-						}
-                        return NO;
-                    }
-                }
-                
-                // 3.1) handle matching standard JSON types
-                if (property.isStandardJSONType && [jsonValue isKindOfClass: property.type]) {
-                    
-                    //mutable properties
-                    if (property.isMutable) {
-                        jsonValue = [jsonValue mutableCopy];
-                    }
-                    
-                    //set the property value
-                    if (![jsonValue isEqual:[self valueForKey:property.name]]) {
-                        [self setValue:jsonValue forKey: property.name];
-                    }
-                    continue;
-                }
-                
-                // 3.3) handle values to transform
-                if (
-                    (![jsonValue isKindOfClass:property.type] && !isNull(jsonValue))
-                    ||
-                    //the property is mutable
-                    property.isMutable
-                    ||
-                    //custom struct property
-                    property.structName
-                    ) {
-                    
-                    // searched around the web how to do this better
-                    // but did not find any solution, maybe that's the best idea? (hardly)
-                    Class sourceClass = [JSONValueTransformer classByResolvingClusterClasses:[jsonValue class]];
-                    
-                    //JMLog(@"to type: [%@] from type: [%@] transformer: [%@]", p.type, sourceClass, selectorName);
-                    
-                    //build a method selector for the property and json object classes
-                    NSString* selectorName = [NSString stringWithFormat:@"%@From%@:",
-                                              (property.structName? property.structName : property.type), //target name
-                                              sourceClass]; //source name
-                    SEL selector = NSSelectorFromString(selectorName);
-                    
-                    //check for custom transformer
-                    BOOL foundCustomTransformer = NO;
-                    if ([valueTransformer respondsToSelector:selector]) {
-                        foundCustomTransformer = YES;
-                    } else {
-                        //try for hidden custom transformer
-                        selectorName = [NSString stringWithFormat:@"__%@",selectorName];
-                        selector = NSSelectorFromString(selectorName);
-                        if ([valueTransformer respondsToSelector:selector]) {
-                            foundCustomTransformer = YES;
-                        }
-                    }
-                    
-                    //check if there's a transformer with that name
-                    if (foundCustomTransformer) {
-                        
-                        //it's OK, believe me...
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
-                        //transform the value
-                        jsonValue = [valueTransformer performSelector:selector withObject:jsonValue];
-#pragma clang diagnostic pop
-                        
-                        if (![jsonValue isEqual:[self valueForKey:property.name]]) {
-                            [self setValue:jsonValue forKey: property.name];
-                        }
-                        
-                    } else {
-                        
-                        // it's not a JSON data type, and there's no transformer for it
-                        // if property type is not supported - that's a programmer mistake -> exception
-                        @throw [NSException exceptionWithName:@"Type not allowed"
-                                                       reason:[NSString stringWithFormat:@"%@ type not supported for %@.%@", property.type, [self class], property.name]
-                                                     userInfo:nil];
-                        return NO;
-                    }
-                    
-                } else {
-                    // 3.4) handle "all other" cases (if any)
-                    if (![jsonValue isEqual:[self valueForKey:property.name]]) {
-                        [self setValue:jsonValue forKey: property.name];
-                    }
-                }
-            }
-        }
-    }
-    
-    return YES;
-}
-
-#pragma mark - property inspection methods
-
--(BOOL)__isJSONModelSubClass:(Class)class
-{
-// http://stackoverflow.com/questions/19883472/objc-nsobject-issubclassofclass-gives-incorrect-failure
-#ifdef UNIT_TESTING
-    return [@"JSONModel" isEqualToString: NSStringFromClass([class superclass])];
-#else
-    return [class isSubclassOfClass:JSONModelClass];
-#endif
-}
-
-//returns a set of the required keys for the model
--(NSMutableSet*)__requiredPropertyNames
-{
-    //fetch the associated property names
-    NSMutableSet* classRequiredPropertyNames = objc_getAssociatedObject(self.class, &kClassRequiredPropertyNamesKey);
-    
-    if (!classRequiredPropertyNames) {
-        classRequiredPropertyNames = [NSMutableSet set];
-        [[self __properties__] enumerateObjectsUsingBlock:^(JSONModelClassProperty* p, NSUInteger idx, BOOL *stop) {
-            if (!p.isOptional) [classRequiredPropertyNames addObject:p.name];
-        }];
-        
-        //persist the list
-        objc_setAssociatedObject(
-                                 self.class,
-                                 &kClassRequiredPropertyNamesKey,
-                                 classRequiredPropertyNames,
-                                 OBJC_ASSOCIATION_RETAIN // This is atomic
-                                 );
-    }
-    return classRequiredPropertyNames;
-}
-
-//returns a list of the model's properties
--(NSArray*)__properties__
-{
-    //fetch the associated object
-    NSDictionary* classProperties = objc_getAssociatedObject(self.class, &kClassPropertiesKey);
-    if (classProperties) return [classProperties allValues];
-
-    //if here, the class needs to inspect itself
-    [self __setup__];
-    
-    //return the property list
-    classProperties = objc_getAssociatedObject(self.class, &kClassPropertiesKey);
-    return [classProperties allValues];
-}
-
-//inspects the class, get's a list of the class properties
--(void)__inspectProperties
-{
-    //JMLog(@"Inspect class: %@", [self class]);
-    
-    NSMutableDictionary* propertyIndex = [NSMutableDictionary dictionary];
-    
-    //temp variables for the loops
-    Class class = [self class];
-    NSScanner* scanner = nil;
-    NSString* propertyType = nil;
-    
-    // inspect inherited properties up to the JSONModel class
-    while (class != [JSONModel class]) {
-        //JMLog(@"inspecting: %@", NSStringFromClass(class));
-        
-        unsigned int propertyCount;
-        objc_property_t *properties = class_copyPropertyList(class, &propertyCount);
-        
-        //loop over the class properties
-        for (unsigned int i = 0; i < propertyCount; i++) {
-
-            JSONModelClassProperty* p = [[JSONModelClassProperty alloc] init];
-
-            //get property name
-            objc_property_t property = properties[i];
-            const char *propertyName = property_getName(property);
-            p.name = @(propertyName);
-            
-            //JMLog(@"property: %@", p.name);
-            
-            //get property attributes
-            const char *attrs = property_getAttributes(property);
-            NSString* propertyAttributes = @(attrs);
-            NSArray* attributeItems = [propertyAttributes componentsSeparatedByString:@","];
-            
-            //ignore read-only properties
-            if ([attributeItems containsObject:@"R"]) {
-                continue; //to next property
-            }
-            
-            //check for 64b BOOLs
-            if ([propertyAttributes hasPrefix:@"Tc,"]) {
-                //mask BOOLs as structs so they can have custom converters
-                p.structName = @"BOOL";
-            }
-            
-            scanner = [NSScanner scannerWithString: propertyAttributes];
-            
-            //JMLog(@"attr: %@", [NSString stringWithCString:attrs encoding:NSUTF8StringEncoding]);
-            [scanner scanUpToString:@"T" intoString: nil];
-            [scanner scanString:@"T" intoString:nil];
-            
-            //check if the property is an instance of a class
-            if ([scanner scanString:@"@\"" intoString: &propertyType]) {
-                
-                [scanner scanUpToCharactersFromSet:[NSCharacterSet characterSetWithCharactersInString:@"\"<"]
-                                        intoString:&propertyType];
-                
-                //JMLog(@"type: %@", propertyClassName);
-                p.type = NSClassFromString(propertyType);
-                p.isMutable = ([propertyType rangeOfString:@"Mutable"].location != NSNotFound);
-                p.isStandardJSONType = [allowedJSONTypes containsObject:p.type];
-                
-                //read through the property protocols
-                while ([scanner scanString:@"<" intoString:NULL]) {
-                    
-                    NSString* protocolName = nil;
-                    
-                    [scanner scanUpToString:@">" intoString: &protocolName];
-                    
-                    if ([protocolName isEqualToString:@"Optional"]) {
-                        p.isOptional = YES;
-                    } else if([protocolName isEqualToString:@"Index"]) {
-                        p.isIndex = YES;
-                        objc_setAssociatedObject(
-                                                 self.class,
-                                                 &kIndexPropertyNameKey,
-                                                 p.name,
-                                                 OBJC_ASSOCIATION_RETAIN // This is atomic
-                                                 );
-                    } else if([protocolName isEqualToString:@"ConvertOnDemand"]) {
-                        p.convertsOnDemand = YES;
-                    } else if([protocolName isEqualToString:@"Ignore"]) {
-                        p = nil;
-                    } else {
-                        p.protocol = protocolName;
-                    }
-                    
-                    [scanner scanString:@">" intoString:NULL];
-                }
-
-            }
-            //check if the property is a structure
-            else if ([scanner scanString:@"{" intoString: &propertyType]) {
-                [scanner scanCharactersFromSet:[NSCharacterSet alphanumericCharacterSet]
-                                    intoString:&propertyType];
-                
-                p.isStandardJSONType = NO;
-                p.structName = propertyType;
-
-            }
-            //the property must be a primitive
-            else {
-
-                //the property contains a primitive data type
-                [scanner scanUpToCharactersFromSet:[NSCharacterSet characterSetWithCharactersInString:@","]
-                                        intoString:&propertyType];
-                
-                //get the full name of the primitive type
-                propertyType = valueTransformer.primitivesNames[propertyType];
-                
-                if (![allowedPrimitiveTypes containsObject:propertyType]) {
-                    
-                    //type not allowed - programmer mistaken -> exception
-                    @throw [NSException exceptionWithName:@"JSONModelProperty type not allowed"
-                                                   reason:[NSString stringWithFormat:@"Property type of %@.%@ is not supported by JSONModel.", self.class, p.name]
-                                                 userInfo:nil];
-                }
-
-            }
-
-            NSString *nsPropertyName = @(propertyName);
-            if([[self class] propertyIsOptional:nsPropertyName]){
-                p.isOptional = YES;
-            }
-            
-            if([[self class] propertyIsIgnored:nsPropertyName]){
-                p = nil;
-            }
-
-            NSString* customProtocol = [[self class] protocolForArrayProperty:nsPropertyName];
-            if (customProtocol) {
-                p.protocol = customProtocol;
-            }
-            
-            //few cases where JSONModel will ignore properties automatically
-            if ([propertyType isEqualToString:@"Block"]) {
-                p = nil;
-            }
-            
-            //add the property object to the temp index
-            if (p && ![propertyIndex objectForKey:p.name]) {
-                [propertyIndex setValue:p forKey:p.name];
-            }
-        }
-        
-        free(properties);
-        
-        //ascend to the super of the class
-        //(will do that until it reaches the root class - JSONModel)
-        class = [class superclass];
-    }
-    
-    //finally store the property index in the static property index
-    objc_setAssociatedObject(
-                             self.class,
-                             &kClassPropertiesKey,
-                             [propertyIndex copy],
-                             OBJC_ASSOCIATION_RETAIN // This is atomic
-                             );
-}
-
-#pragma mark - built-in transformer methods
-//few built-in transformations
--(id)__transform:(id)value forProperty:(JSONModelClassProperty*)property error:(NSError**)err
-{
-    Class protocolClass = NSClassFromString(property.protocol);
-    if (!protocolClass) {
-
-        //no other protocols on arrays and dictionaries
-        //except JSONModel classes
-        if ([value isKindOfClass:[NSArray class]]) {
-            @throw [NSException exceptionWithName:@"Bad property protocol declaration"
-                                           reason:[NSString stringWithFormat:@"<%@> is not allowed JSONModel property protocol, and not a JSONModel class.", property.protocol]
-                                         userInfo:nil];
-        }
-        return value;
-    }
-    
-    //if the protocol is actually a JSONModel class
-    if ([self __isJSONModelSubClass:protocolClass]) {
-
-        //check if it's a list of models
-        if ([property.type isSubclassOfClass:[NSArray class]]) {
-
-			// Expecting an array, make sure 'value' is an array
-			if(![[value class] isSubclassOfClass:[NSArray class]])
-			{
-				if(err != nil)
-				{
-					NSString* mismatch = [NSString stringWithFormat:@"Property '%@' is declared as NSArray<%@>* but the corresponding JSON value is not a JSON Array.", property.name, property.protocol];
-					JSONModelError* typeErr = [JSONModelError errorInvalidDataWithTypeMismatch:mismatch];
-					*err = [typeErr errorByPrependingKeyPathComponent:property.name];
-				}
-				return nil;
-			}
-
-            if (property.convertsOnDemand) {
-                //on demand conversion
-                value = [[JSONModelArray alloc] initWithArray:value modelClass:[protocolClass class]];
-                
-            } else {
-                //one shot conversion
-				JSONModelError* arrayErr = nil;
-                value = [[protocolClass class] arrayOfModelsFromDictionaries:value error:&arrayErr];
-				if((err != nil) && (arrayErr != nil))
-				{
-					*err = [arrayErr errorByPrependingKeyPathComponent:property.name];
-					return nil;
-				}
-            }
-        }
-        
-        //check if it's a dictionary of models
-        if ([property.type isSubclassOfClass:[NSDictionary class]]) {
-
-			// Expecting a dictionary, make sure 'value' is a dictionary
-			if(![[value class] isSubclassOfClass:[NSDictionary class]])
-			{
-				if(err != nil)
-				{
-					NSString* mismatch = [NSString stringWithFormat:@"Property '%@' is declared as NSDictionary<%@>* but the corresponding JSON value is not a JSON Object.", property.name, property.protocol];
-					JSONModelError* typeErr = [JSONModelError errorInvalidDataWithTypeMismatch:mismatch];
-					*err = [typeErr errorByPrependingKeyPathComponent:property.name];
-				}
-				return nil;
-			}
-
-            NSMutableDictionary* res = [NSMutableDictionary dictionary];
-
-            for (NSString* key in [value allKeys]) {
-				JSONModelError* initErr = nil;
-                id obj = [[[protocolClass class] alloc] initWithDictionary:value[key] error:&initErr];
-				if (obj == nil)
-				{
-					// Propagate the error, including the property name as the key-path component
-					if((err != nil) && (initErr != nil))
-					{
-						initErr = [initErr errorByPrependingKeyPathComponent:key];
-						*err = [initErr errorByPrependingKeyPathComponent:property.name];
-					}
-                    return nil;
-                }
-                [res setValue:obj forKey:key];
-            }
-            value = [NSDictionary dictionaryWithDictionary:res];
-        }
-    }
-
-    return value;
-}
-
-//built-in reverse transformations (export to JSON compliant objects)
--(id)__reverseTransform:(id)value forProperty:(JSONModelClassProperty*)property
-{
-    Class protocolClass = NSClassFromString(property.protocol);
-    if (!protocolClass) return value;
-    
-    //if the protocol is actually a JSONModel class
-    if ([self __isJSONModelSubClass:protocolClass]) {
-
-        //check if should export list of dictionaries
-        if (property.type == [NSArray class] || property.type == [NSMutableArray class]) {
-            NSMutableArray* tempArray = [NSMutableArray arrayWithCapacity: [(NSArray*)value count] ];
-            for (NSObject<AbstractJSONModelProtocol>* model in (NSArray*)value) {
-                if ([model respondsToSelector:@selector(toDictionary)]) {
-                    [tempArray addObject: [model toDictionary]];
-                } else
-                    [tempArray addObject: model];
-            }
-            return [tempArray copy];
-        }
-        
-        //check if should export dictionary of dictionaries
-        if (property.type == [NSDictionary class] || property.type == [NSMutableDictionary class]) {
-            NSMutableDictionary* res = [NSMutableDictionary dictionary];
-            for (NSString* key in [(NSDictionary*)value allKeys]) {
-                id<AbstractJSONModelProtocol> model = value[key];
-                [res setValue: [model toDictionary] forKey: key];
-            }
-            return [NSDictionary dictionaryWithDictionary:res];
-        }
-    }
-    
-    return value;
-}
-
-#pragma mark - custom transformations
--(BOOL)__customSetValue:(id<NSObject>)value forProperty:(JSONModelClassProperty*)property
-{
-    if (!property.customSetters)
-        property.customSetters = [NSMutableDictionary new];
-
-    NSString *className = NSStringFromClass([JSONValueTransformer classByResolvingClusterClasses:[value class]]);
-
-    if (!property.customSetters[className]) {
-        //check for a custom property setter method
-        NSString* ucfirstName = [property.name stringByReplacingCharactersInRange:NSMakeRange(0,1)
-                                                                       withString:[[property.name substringToIndex:1] uppercaseString]];
-        NSString* selectorName = [NSString stringWithFormat:@"set%@With%@:", ucfirstName, className];
-
-        SEL customPropertySetter = NSSelectorFromString(selectorName);
-        
-        //check if there's a custom selector like this
-        if (![self respondsToSelector: customPropertySetter]) {
-            property.customSetters[className] = [NSNull null];
-            return NO;
-        }
-        
-        //cache the custom setter selector
-        property.customSetters[className] = selectorName;
-    }
-    
-    if (property.customSetters[className] != [NSNull null]) {
-        //call the custom setter
-        //https://github.com/steipete
-        SEL selector = NSSelectorFromString(property.customSetters[className]);
-        ((void (*) (id, SEL, id))objc_msgSend)(self, selector, value);
-        return YES;
-    }
-    
-    return NO;
-}
-
--(BOOL)__customGetValue:(id<NSObject>*)value forProperty:(JSONModelClassProperty*)property
-{
-    if (property.getterType == kNotInspected) {
-        //check for a custom property getter method
-        NSString* ucfirstName = [property.name stringByReplacingCharactersInRange: NSMakeRange(0,1)
-                                                                       withString: [[property.name substringToIndex:1] uppercaseString]];
-        NSString* selectorName = [NSString stringWithFormat:@"JSONObjectFor%@", ucfirstName];
-        
-        SEL customPropertyGetter = NSSelectorFromString(selectorName);
-        if (![self respondsToSelector: customPropertyGetter]) {
-            property.getterType = kNo;
-            return NO;
-        }
-        
-        property.getterType = kCustom;
-        property.customGetter = customPropertyGetter;
-
-    }
-    
-    if (property.getterType==kCustom) {
-        //call the custom getter
-        #pragma clang diagnostic push
-        #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
-        *value = [self performSelector:property.customGetter];
-        #pragma clang diagnostic pop
-        return YES;
-    }
-    
-    return NO;
-}
-
-#pragma mark - persistance
--(void)__createDictionariesForKeyPath:(NSString*)keyPath inDictionary:(NSMutableDictionary**)dict
-{
-    //find if there's a dot left in the keyPath
-    NSUInteger dotLocation = [keyPath rangeOfString:@"."].location;
-    if (dotLocation==NSNotFound) return;
-    
-    //inspect next level
-    NSString* nextHierarchyLevelKeyName = [keyPath substringToIndex: dotLocation];
-    NSDictionary* nextLevelDictionary = (*dict)[nextHierarchyLevelKeyName];
-
-    if (nextLevelDictionary==nil) {
-        //create non-existing next level here
-        nextLevelDictionary = [NSMutableDictionary dictionary];
-    }
-    
-    //recurse levels
-    [self __createDictionariesForKeyPath:[keyPath substringFromIndex: dotLocation+1]
-                            inDictionary:&nextLevelDictionary ];
-    
-    //create the hierarchy level
-    [*dict setValue:nextLevelDictionary  forKeyPath: nextHierarchyLevelKeyName];
-}
-
--(NSDictionary*)toDictionary
-{
-    return [self toDictionaryWithKeys:nil];
-}
-
--(NSString*)toJSONString
-{
-    return [self toJSONStringWithKeys:nil];
-}
-
--(NSData*)toJSONData
-{
-	return [self toJSONDataWithKeys:nil];
-}
-
-//exports the model as a dictionary of JSON compliant objects
--(NSDictionary*)toDictionaryWithKeys:(NSArray*)propertyNames
-{
-    NSArray* properties = [self __properties__];
-    NSMutableDictionary* tempDictionary = [NSMutableDictionary dictionaryWithCapacity:properties.count];
-
-    id value;
-
-    //loop over all properties
-    for (JSONModelClassProperty* p in properties) {
-
-        //skip if unwanted
-        if (propertyNames != nil && ![propertyNames containsObject:p.name])
-            continue;
-        
-        //fetch key and value
-        NSString* keyPath = (self.__keyMapper||globalKeyMapper) ? [self __mapString:p.name withKeyMapper:self.__keyMapper importing:YES] : p.name;
-        value = [self valueForKey: p.name];
-        
-        //JMLog(@"toDictionary[%@]->[%@] = '%@'", p.name, keyPath, value);
-
-        if ([keyPath rangeOfString:@"."].location != NSNotFound) {
-            //there are sub-keys, introduce dictionaries for them
-            [self __createDictionariesForKeyPath:keyPath inDictionary:&tempDictionary];
-        }
-        
-        //check for custom getter
-        if ([self __customGetValue:&value forProperty:p]) {
-            //custom getter, all done
-            [tempDictionary setValue:value forKeyPath:keyPath];
-            continue;
-        }
-        
-        //export nil when they are not optional values as JSON null, so that the structure of the exported data
-        //is still valid if it's to be imported as a model again
-        if (isNull(value)) {
-            
-            if (p.isOptional)
-            {
-                [tempDictionary removeObjectForKey:keyPath];
-            }
-            else
-            {
-                [tempDictionary setValue:[NSNull null] forKeyPath:keyPath];
-            }
-            continue;
-        }
-        
-        //check if the property is another model
-        if ([value isKindOfClass:JSONModelClass]) {
-
-            //recurse models
-            value = [(JSONModel*)value toDictionary];
-            [tempDictionary setValue:value forKeyPath: keyPath];
-            
-            //for clarity
-            continue;
-            
-        } else {
-            
-            // 1) check for built-in transformation
-            if (p.protocol) {
-                value = [self __reverseTransform:value forProperty:p];
-            }
-            
-            // 2) check for standard types OR 2.1) primitives
-            if (p.structName==nil && (p.isStandardJSONType || p.type==nil)) {
-
-                //generic get value
-                [tempDictionary setValue:value forKeyPath: keyPath];
-                
-                continue;
-            }
-            
-            // 3) try to apply a value transformer
-            if (YES) {
-                
-                //create selector from the property's class name
-                NSString* selectorName = [NSString stringWithFormat:@"%@From%@:", @"JSONObject", p.type?p.type:p.structName];
-                SEL selector = NSSelectorFromString(selectorName);
-                
-                BOOL foundCustomTransformer = NO;
-                if ([valueTransformer respondsToSelector:selector]) {
-                    foundCustomTransformer = YES;
-                } else {
-                    //try for hidden transformer
-                    selectorName = [NSString stringWithFormat:@"__%@",selectorName];
-                    selector = NSSelectorFromString(selectorName);
-                    if ([valueTransformer respondsToSelector:selector]) {
-                        foundCustomTransformer = YES;
-                    }
-                }
-                
-                //check if there's a transformer declared
-                if (foundCustomTransformer) {
-                    
-                    //it's OK, believe me...
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
-                    value = [valueTransformer performSelector:selector withObject:value];
-#pragma clang diagnostic pop
-                    
-                    [tempDictionary setValue:value forKeyPath: keyPath];
-                    
-                } else {
-
-                    //in this case most probably a custom property was defined in a model
-                    //but no default reverse transformer for it
-                    @throw [NSException exceptionWithName:@"Value transformer not found"
-                                                   reason:[NSString stringWithFormat:@"[JSONValueTransformer %@] not found", selectorName]
-                                                 userInfo:nil];
-                    return nil;
-                }
-            }
-        }
-    }
-    
-    return [tempDictionary copy];
-}
-
-//exports model to a dictionary and then to a JSON string
--(NSData*)toJSONDataWithKeys:(NSArray*)propertyNames
-{
-	NSData* jsonData = nil;
-	NSError* jsonError = nil;
-	
-	@try {
-		NSDictionary* dict = [self toDictionaryWithKeys:propertyNames];
-		jsonData = [NSJSONSerialization dataWithJSONObject:dict options:kNilOptions error:&jsonError];
-	}
-	@catch (NSException *exception) {
-		//this should not happen in properly design JSONModel
-		//usually means there was no reverse transformer for a custom property
-		JMLog(@"EXCEPTION: %@", exception.description);
-		return nil;
-	}
-	
-	return jsonData;
-}
-
--(NSString*)toJSONStringWithKeys:(NSArray*)propertyNames
-{
-    return [[NSString alloc] initWithData: [self toJSONDataWithKeys: propertyNames]
-								 encoding: NSUTF8StringEncoding];
-}
-
-#pragma mark - import/export of lists
-//loop over an NSArray of JSON objects and turn them into models
-+(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array
-{
-	return [self arrayOfModelsFromDictionaries:array error:nil];
-}
-
-+ (NSMutableArray *)arrayOfModelsFromData:(NSData *)data error:(NSError **)err
-{
-    id json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:err];
-    if (!json || ![json isKindOfClass:[NSArray class]]) return nil;
-    
-    return [self arrayOfModelsFromDictionaries:json error:err];
-}
-
-+ (NSMutableArray *)arrayOfModelsFromString:(NSString *)string error:(NSError **)err
-{
-    return [self arrayOfModelsFromData:[string dataUsingEncoding:NSUTF8StringEncoding] error:err];
-}
-
-// Same as above, but with error reporting
-+(NSMutableArray*)arrayOfModelsFromDictionaries:(NSArray*)array error:(NSError**)err
-{
-    //bail early
-    if (isNull(array)) return nil;
-
-    //parse dictionaries to objects
-    NSMutableArray* list = [NSMutableArray arrayWithCapacity: [array count]];
-
-    for (id d in array)
-    {
-        if ([d isKindOfClass:NSDictionary.class])
-        {
-		    JSONModelError* initErr = nil;
-            id obj = [[self alloc] initWithDictionary:d error:&initErr];
-            if (obj == nil)
-            {
-                // Propagate the error, including the array index as the key-path component
-			    if((err != nil) && (initErr != nil))
-                {
-				    NSString* path = [NSString stringWithFormat:@"[%lu]", (unsigned long)list.count];
-                    *err = [initErr errorByPrependingKeyPathComponent:path];
-                }
-                return nil;
-            }
-
-            [list addObject: obj];
-        } else if ([d isKindOfClass:NSArray.class])
-        {
-            [list addObjectsFromArray:[self arrayOfModelsFromDictionaries:d error:err]];
-        } else
-        {
-            // This is very bad
-        }
-
-    }
-
-    return list;
-}
-
-+ (NSMutableDictionary *)dictionaryOfModelsFromString:(NSString *)string error:(NSError **)err
-{
-    return [self dictionaryOfModelsFromData:[string dataUsingEncoding:NSUTF8StringEncoding] error:err];
-}
-
-+ (NSMutableDictionary *)dictionaryOfModelsFromData:(NSData *)data error:(NSError **)err
-{
-    id json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:err];
-    if (!json || ![json isKindOfClass:[NSDictionary class]]) return nil;
-
-    return [self dictionaryOfModelsFromDictionary:json error:err];
-}
-
-+ (NSMutableDictionary *)dictionaryOfModelsFromDictionary:(NSDictionary *)dictionary error:(NSError **)err
-{
-    NSMutableDictionary *output = [NSMutableDictionary dictionaryWithCapacity:dictionary.count];
-
-    for (NSString *key in dictionary.allKeys)
-    {
-        id object = dictionary[key];
-
-        if ([object isKindOfClass:NSDictionary.class])
-        {
-            id obj = [[self alloc] initWithDictionary:object error:err];
-            if (obj == nil) return nil;
-            output[key] = obj;
-        }
-        else if ([object isKindOfClass:NSArray.class])
-        {
-            id obj = [self arrayOfModelsFromDictionaries:object error:err];
-            if (obj == nil) return nil;
-            output[key] = obj;
-        }
-        else
-        {
-            *err = [JSONModelError errorInvalidDataWithTypeMismatch:@"Only dictionaries and arrays are supported"];
-            return nil;
-        }
-    }
-
-    return output;
-}
-
-//loop over NSArray of models and export them to JSON objects
-+(NSMutableArray*)arrayOfDictionariesFromModels:(NSArray*)array
-{
-    //bail early
-    if (isNull(array)) return nil;
-
-    //convert to dictionaries
-    NSMutableArray* list = [NSMutableArray arrayWithCapacity: [array count]];
-    
-    for (id<AbstractJSONModelProtocol> object in array) {
-        
-        id obj = [object toDictionary];
-        if (!obj) return nil;
-        
-        [list addObject: obj];
-    }
-    return list;
-}
-
-//loop over NSArray of models and export them to JSON objects with specific properties
-+(NSMutableArray*)arrayOfDictionariesFromModels:(NSArray*)array propertyNamesToExport:(NSArray*)propertyNamesToExport;
-{
-    //bail early
-    if (isNull(array)) return nil;
-    
-    //convert to dictionaries
-    NSMutableArray* list = [NSMutableArray arrayWithCapacity: [array count]];
-    
-    for (id<AbstractJSONModelProtocol> object in array) {
-        
-        id obj = [object toDictionaryWithKeys:propertyNamesToExport];
-        if (!obj) return nil;
-        
-        [list addObject: obj];
-    }
-    return list;
-}
-
-+(NSMutableDictionary *)dictionaryOfDictionariesFromModels:(NSDictionary *)dictionary
-{
-    //bail early
-    if (isNull(dictionary)) return nil;
-
-    NSMutableDictionary *output = [NSMutableDictionary dictionaryWithCapacity:dictionary.count];
-
-    for (NSString *key in dictionary.allKeys) {
-        id <AbstractJSONModelProtocol> object = dictionary[key];
-        id obj = [object toDictionary];
-        if (!obj) return nil;
-        output[key] = obj;
-    }
-
-    return output;
-}
-
-#pragma mark - custom comparison methods
--(NSString*)indexPropertyName
-{
-    //custom getter for an associated object
-    return objc_getAssociatedObject(self.class, &kIndexPropertyNameKey);
-}
-
--(BOOL)isEqual:(id)object
-{
-    //bail early if different classes
-    if (![object isMemberOfClass:[self class]]) return NO;
-    
-    if (self.indexPropertyName) {
-        //there's a defined ID property
-        id objectId = [object valueForKey: self.indexPropertyName];
-        return [[self valueForKey: self.indexPropertyName] isEqual:objectId];
-    }
-    
-    //default isEqual implementation
-    return [super isEqual:object];
-}
-
--(NSComparisonResult)compare:(id)object
-{
-    if (self.indexPropertyName) {
-        id objectId = [object valueForKey: self.indexPropertyName];
-        if ([objectId respondsToSelector:@selector(compare:)]) {
-            return [[self valueForKey:self.indexPropertyName] compare:objectId];
-        }
-    }
-
-    //on purpose postponing the asserts for speed optimization
-    //these should not happen anyway in production conditions
-    NSAssert(self.indexPropertyName, @"Can't compare models with no <Index> property");
-    NSAssert1(NO, @"The <Index> property of %@ is not comparable class.", [self class]);
-    return kNilOptions;
-}
-
-- (NSUInteger)hash
-{
-    if (self.indexPropertyName) {
-        id val = [self valueForKey:self.indexPropertyName];
-
-        if (val) {
-            return [val hash];
-        }
-    }
-
-    return [super hash];
-}
-
-#pragma mark - custom data validation
--(BOOL)validate:(NSError**)error
-{
-    return YES;
-}
-
-#pragma mark - custom recursive description
-//custom description method for debugging purposes
--(NSString*)description
-{
-    NSMutableString* text = [NSMutableString stringWithFormat:@"<%@> \n", [self class]];
-    
-    for (JSONModelClassProperty *p in [self __properties__]) {
-        
-        id value = ([p.name isEqualToString:@"description"])?self->_description:[self valueForKey:p.name];
-        NSString* valueDescription = (value)?[value description]:@"<nil>";
-        
-        if (p.isStandardJSONType && ![value respondsToSelector:@selector(count)] && [valueDescription length]>60 && !p.convertsOnDemand) {
-
-            //cap description for longer values
-            valueDescription = [NSString stringWithFormat:@"%@...", [valueDescription substringToIndex:59]];
-        }
-        valueDescription = [valueDescription stringByReplacingOccurrencesOfString:@"\n" withString:@"\n   "];
-        [text appendFormat:@"   [%@]: %@\n", p.name, valueDescription];
-    }
-    
-    [text appendFormat:@"</%@>", [self class]];
-    return text;
-}
-
-#pragma mark - key mapping
-+(JSONKeyMapper*)keyMapper
-{
-    return nil;
-}
-
-+(void)setGlobalKeyMapper:(JSONKeyMapper*)globalKeyMapperParam
-{
-    globalKeyMapper = globalKeyMapperParam;
-}
-
-+(BOOL)propertyIsOptional:(NSString*)propertyName
-{
-    return NO;
-}
-
-+(BOOL)propertyIsIgnored:(NSString *)propertyName
-{
-    return NO;
-}
-
-+(NSString*)protocolForArrayProperty:(NSString *)propertyName
-{
-    return nil;
-}
-
-#pragma mark - working with incomplete models
-- (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping
-{
-    [self mergeFromDictionary:dict useKeyMapping:useKeyMapping error:nil];
-}
-
-- (void)mergeFromDictionary:(NSDictionary *)dict useKeyMapping:(BOOL)useKeyMapping error:(NSError **)error
-{
-    [self __importDictionary:dict withKeyMapper:(useKeyMapping)? self.__keyMapper:nil validation:NO error:error];
-}
-
-#pragma mark - NSCopying, NSCoding
--(instancetype)copyWithZone:(NSZone *)zone
-{
-    return [NSKeyedUnarchiver unarchiveObjectWithData:
-        [NSKeyedArchiver archivedDataWithRootObject:self]
-     ];
-}
-
--(instancetype)initWithCoder:(NSCoder *)decoder
-{
-    NSString* json = [decoder decodeObjectForKey:@"json"];
-    
-    JSONModelError *error = nil;
-    self = [self initWithString:json error:&error];
-    if (error) {
-        JMLog(@"%@",[error localizedDescription]);
-    }
-    return self;
-}
-
--(void)encodeWithCoder:(NSCoder *)encoder
-{
-    [encoder encodeObject:self.toJSONString forKey:@"json"];
-}
-
-+ (BOOL)supportsSecureCoding
-{
-    return YES;
-}
-
-@end

+ 0 - 60
Benchmark/Vendor/JSONModel/JSONModel/JSONModelArray.h

@@ -1,60 +0,0 @@
-//
-//  JSONModelArray.h
-//
-//  @version 0.8.0
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import <Foundation/Foundation.h>
-
-/**
- * **Don't make instances of JSONModelArray yourself, except you know what you are doing.**
- *
- * You get automatically JSONModelArray instances, when you declare a convert on demand property, like so:
- * 
- * @property (strong, nonatomic) NSArray&lt;JSONModel, ConvertOnDemand&gt;* list;
- *
- * The class stores its contents as they come from JSON, and upon the first request
- * of each of the objects stored in the array, it'll be converted to the target model class.
- * Thus saving time upon the very first model creation.
- */
-@interface JSONModelArray : NSObject <NSFastEnumeration>
-
-/**
- * Don't make instances of JSONModelArray yourself, except you know what you are doing.
- * 
- * @param array an array of NSDictionary objects
- * @param cls the JSONModel sub-class you'd like the NSDictionaries to be converted to on demand
- */
-- (id)initWithArray:(NSArray *)array modelClass:(Class)cls;
-
-- (id)objectAtIndex:(NSUInteger)index;
-- (id)objectAtIndexedSubscript:(NSUInteger)index;
-- (void)forwardInvocation:(NSInvocation *)anInvocation;
-- (NSUInteger)count;
-- (id)firstObject;
-- (id)lastObject;
-
-/**
- * Looks up the array's contents and tries to find a JSONModel object
- * with matching index property value to the indexValue param.
- *
- * Will return nil if no matching model is found. Will return nil if there's no index property
- * defined on the models found in the array (will sample the first object, assuming the array
- * contains homogeneous collection of objects)
- *
- * @param indexValue the id value to search for
- * @return the found model or nil
- */
-- (id)modelWithIndexValue:(id)indexValue;
-
-@end

+ 0 - 145
Benchmark/Vendor/JSONModel/JSONModel/JSONModelArray.m

@@ -1,145 +0,0 @@
-//
-//  JSONModelArray.m
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import "JSONModelArray.h"
-#import "JSONModel.h"
-
-@implementation JSONModelArray
-{
-    NSMutableArray* _storage;
-    Class _targetClass;
-}
-
--(id)initWithArray:(NSArray *)array modelClass:(Class)cls
-{
-    self = [super init];
-    
-    if (self) {
-        _storage = [NSMutableArray arrayWithArray:array];
-        _targetClass = cls;
-    }
-    return self;
-}
-
--(id)firstObject
-{
-    return [self objectAtIndex:0];
-}
-
--(id)lastObject
-{
-    return [self objectAtIndex:_storage.count - 1];
-}
-
--(id)objectAtIndex:(NSUInteger)index
-{
-	return [self objectAtIndexedSubscript:index];
-}
-
--(id)objectAtIndexedSubscript:(NSUInteger)index
-{
-    id object = _storage[index];
-    if (![object isMemberOfClass:_targetClass]) {
-        NSError* err = nil;
-        object = [[_targetClass alloc] initWithDictionary:object error:&err];
-        if (object) {
-            _storage[index] = object;
-        }
-    }
-    return object;
-}
-
--(void)forwardInvocation:(NSInvocation *)anInvocation
-{
-    [anInvocation invokeWithTarget:_storage];
-}
-
--(id)forwardingTargetForSelector:(SEL)selector
-{
-    static NSArray *overriddenMethods = nil;
-    if (!overriddenMethods) overriddenMethods = @[@"initWithArray:modelClass:", @"objectAtIndex:", @"objectAtIndexedSubscript:", @"count", @"modelWithIndexValue:", @"description", @"mutableCopy", @"firstObject", @"lastObject", @"countByEnumeratingWithState:objects:count:"];
-    if ([overriddenMethods containsObject:NSStringFromSelector(selector)]) {
-        return self;
-    }
-    return _storage;
-}
-
--(NSUInteger)count
-{
-    return _storage.count;
-}
-
--(id)modelWithIndexValue:(id)indexValue
-{
-    if (self.count==0) return nil;
-    if (![_storage[0] indexPropertyName]) return nil;
-    
-    for (JSONModel* model in _storage) {
-        if ([[model valueForKey:model.indexPropertyName] isEqual:indexValue]) {
-            return model;
-        }
-    }
-    
-    return nil;
-}
-
--(id)mutableCopy
-{
-    //it's already mutable
-    return self;
-}
-
-#pragma mark - description
--(NSString*)description
-{
-    NSMutableString* res = [NSMutableString stringWithFormat:@"<JSONModelArray[%@]>\n", [_targetClass description]];
-    for (id m in _storage) {
-        [res appendString: [m description]];
-        [res appendString: @",\n"];
-    }
-    [res appendFormat:@"\n</JSONModelArray>"];
-    return res;
-}
-
--(NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state
-								 objects:(id __unsafe_unretained [])stackbuf
-								   count:(NSUInteger)stackbufLength
-{
-    NSUInteger count = 0;
-    
-    unsigned long countOfItemsAlreadyEnumerated = state->state;
-    
-    if (countOfItemsAlreadyEnumerated == 0) {
-        state->mutationsPtr = &state->extra[0];
-    }
-	
-    if (countOfItemsAlreadyEnumerated < [self count]) {
-        state->itemsPtr = stackbuf;
-        while ((countOfItemsAlreadyEnumerated < [self count]) && (count < stackbufLength)) {
-            stackbuf[count] = [self objectAtIndex:countOfItemsAlreadyEnumerated];
-            countOfItemsAlreadyEnumerated++;
-            count++;
-        }
-    } else {
-        count = 0;
-    }
-	
-    state->state = countOfItemsAlreadyEnumerated;
-    
-    return count;
-}
-
-@end

+ 0 - 73
Benchmark/Vendor/JSONModel/JSONModel/JSONModelClassProperty.h

@@ -1,73 +0,0 @@
-//
-//  JSONModelClassProperty.h
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import <Foundation/Foundation.h>
-
-enum kCustomizationTypes {
-    kNotInspected = 0,
-    kCustom,
-    kNo
-    };
-
-typedef enum kCustomizationTypes PropertyGetterType;
-
-/**
- * **You do not need to instantiate this class yourself.** This class is used internally by JSONModel
- * to inspect the declared properties of your model class.
- *
- * Class to contain the information, representing a class property
- * It features the property's name, type, whether it's a required property, 
- * and (optionally) the class protocol
- */
-@interface JSONModelClassProperty : NSObject
-
-/** The name of the declared property (not the ivar name) */
-@property (copy, nonatomic) NSString* name;
-
-/** A property class type  */
-@property (assign, nonatomic) Class type;
-
-/** Struct name if a struct */
-@property (strong, nonatomic) NSString* structName;
-
-/** The name of the protocol the property conforms to (or nil) */
-@property (copy, nonatomic) NSString* protocol;
-
-/** If YES, it can be missing in the input data, and the input would be still valid */
-@property (assign, nonatomic) BOOL isOptional;
-
-/** If YES - don't call any transformers on this property's value */
-@property (assign, nonatomic) BOOL isStandardJSONType;
-
-/** If YES - create a mutable object for the value of the property */
-@property (assign, nonatomic) BOOL isMutable;
-
-/** If YES - create models on demand for the array members */
-@property (assign, nonatomic) BOOL convertsOnDemand;
-
-/** If YES - the value of this property determines equality to other models */
-@property (assign, nonatomic) BOOL isIndex;
-
-/** The status of property getter introspection in a model */
-@property (assign, nonatomic) PropertyGetterType getterType;
-
-/** a custom getter for this property, found in the owning model */
-@property (assign, nonatomic) SEL customGetter;
-
-/** custom setters for this property, found in the owning model */
-@property (strong, nonatomic) NSMutableDictionary<NSString *, id> *customSetters;
-
-@end

+ 0 - 60
Benchmark/Vendor/JSONModel/JSONModel/JSONModelClassProperty.m

@@ -1,60 +0,0 @@
-//
-//  JSONModelClassProperty.m
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import "JSONModelClassProperty.h"
-
-@implementation JSONModelClassProperty
-
--(NSString*)description
-{
-    //build the properties string for the current class property
-    NSMutableArray* properties = [NSMutableArray arrayWithCapacity:8];
-    
-    if (self.isIndex) [properties addObject:@"Index"];
-    if (self.isOptional) [properties addObject:@"Optional"];
-    if (self.isMutable) [properties addObject:@"Mutable"];
-    if (self.convertsOnDemand) [properties addObject:@"ConvertOnDemand"];
-    if (self.isStandardJSONType) [properties addObject:@"Standard JSON type"];
-    if (self.customGetter) [properties addObject:[NSString stringWithFormat: @"Getter = %@", NSStringFromSelector(self.customGetter)]];
-
-    if (self.customSetters)
-    {
-        NSMutableArray *setters = [NSMutableArray array];
-
-        for (id obj in self.customSetters.allValues)
-        {
-            if (obj != [NSNull null])
-                [setters addObject:obj];
-        }
-
-        [properties addObject:[NSString stringWithFormat: @"Setters = [%@]", [setters componentsJoinedByString:@", "]]];
-    }
-    
-    NSString* propertiesString = @"";
-    if (properties.count>0) {
-        propertiesString = [NSString stringWithFormat:@"(%@)", [properties componentsJoinedByString:@", "]];
-    }
-    
-    //return the name, type and additional properties
-    return [NSString stringWithFormat:@"@property %@%@ %@ %@",
-            self.type?[NSString stringWithFormat:@"%@*",self.type]:(self.structName?self.structName:@"primitive"),
-            self.protocol?[NSString stringWithFormat:@"<%@>", self.protocol]:@"",
-            self.name,
-            propertiesString
-            ];
-}
-
-@end

+ 0 - 114
Benchmark/Vendor/JSONModel/JSONModel/JSONModelError.h

@@ -1,114 +0,0 @@
-//
-//  JSONModelError.h
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import <Foundation/Foundation.h>
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-typedef NS_ENUM(int, kJSONModelErrorTypes)
-{
-    kJSONModelErrorInvalidData = 1,
-    kJSONModelErrorBadResponse = 2,
-    kJSONModelErrorBadJSON = 3,
-    kJSONModelErrorModelIsInvalid = 4,
-    kJSONModelErrorNilInput = 5
-};
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-/** The domain name used for the JSONModelError instances */
-extern NSString* const JSONModelErrorDomain;
-
-/** 
- * If the model JSON input misses keys that are required, check the
- * userInfo dictionary of the JSONModelError instance you get back - 
- * under the kJSONModelMissingKeys key you will find a list of the
- * names of the missing keys.
- */
-extern NSString* const kJSONModelMissingKeys;
-
-/**
- * If JSON input has a different type than expected by the model, check the
- * userInfo dictionary of the JSONModelError instance you get back -
- * under the kJSONModelTypeMismatch key you will find a description
- * of the mismatched types.
- */
-extern NSString* const kJSONModelTypeMismatch;
-
-/**
- * If an error occurs in a nested model, check the userInfo dictionary of
- * the JSONModelError instance you get back - under the kJSONModelKeyPath
- * key you will find key-path at which the error occurred.
- */
-extern NSString* const kJSONModelKeyPath;
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Custom NSError subclass with shortcut methods for creating 
- * the common JSONModel errors
- */
-@interface JSONModelError : NSError
-
-@property (strong, nonatomic) NSHTTPURLResponse* httpResponse;
-
-@property (strong, nonatomic) NSData* responseData;
-
-/**
- * Creates a JSONModelError instance with code kJSONModelErrorInvalidData = 1
- */
-+(id)errorInvalidDataWithMessage:(NSString*)message;
-
-/**
- * Creates a JSONModelError instance with code kJSONModelErrorInvalidData = 1
- * @param keys a set of field names that were required, but not found in the input
- */
-+(id)errorInvalidDataWithMissingKeys:(NSSet*)keys;
-
-/**
- * Creates a JSONModelError instance with code kJSONModelErrorInvalidData = 1
- * @param mismatchDescription description of the type mismatch that was encountered.
- */
-+(id)errorInvalidDataWithTypeMismatch:(NSString*)mismatchDescription;
-
-/**
- * Creates a JSONModelError instance with code kJSONModelErrorBadResponse = 2
- */
-+(id)errorBadResponse;
-
-/**
- * Creates a JSONModelError instance with code kJSONModelErrorBadJSON = 3
- */
-+(id)errorBadJSON;
-
-/**
- * Creates a JSONModelError instance with code kJSONModelErrorModelIsInvalid = 4
- */
-+(id)errorModelIsInvalid;
-
-/**
- * Creates a JSONModelError instance with code kJSONModelErrorNilInput = 5
- */
-+(id)errorInputIsNil;
-
-/**
- * Creates a new JSONModelError with the same values plus information about the key-path of the error.
- * Properties in the new error object are the same as those from the receiver,
- * except that a new key kJSONModelKeyPath is added to the userInfo dictionary.
- * This key contains the component string parameter. If the key is already present
- * then the new error object has the component string prepended to the existing value.
- */
-- (instancetype)errorByPrependingKeyPathComponent:(NSString*)component;
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-@end

+ 0 - 93
Benchmark/Vendor/JSONModel/JSONModel/JSONModelError.m

@@ -1,93 +0,0 @@
-//
-//  JSONModelError.m
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import "JSONModelError.h"
-
-NSString* const JSONModelErrorDomain = @"JSONModelErrorDomain";
-NSString* const kJSONModelMissingKeys = @"kJSONModelMissingKeys";
-NSString* const kJSONModelTypeMismatch = @"kJSONModelTypeMismatch";
-NSString* const kJSONModelKeyPath = @"kJSONModelKeyPath";
-
-@implementation JSONModelError
-
-+(id)errorInvalidDataWithMessage:(NSString*)message
-{
-	message = [NSString stringWithFormat:@"Invalid JSON data: %@", message];
-    return [JSONModelError errorWithDomain:JSONModelErrorDomain
-                                      code:kJSONModelErrorInvalidData
-                                  userInfo:@{NSLocalizedDescriptionKey:message}];
-}
-
-+(id)errorInvalidDataWithMissingKeys:(NSSet *)keys
-{
-    return [JSONModelError errorWithDomain:JSONModelErrorDomain
-                                      code:kJSONModelErrorInvalidData
-                                  userInfo:@{NSLocalizedDescriptionKey:@"Invalid JSON data. Required JSON keys are missing from the input. Check the error user information.",kJSONModelMissingKeys:[keys allObjects]}];
-}
-
-+(id)errorInvalidDataWithTypeMismatch:(NSString*)mismatchDescription
-{
-    return [JSONModelError errorWithDomain:JSONModelErrorDomain
-                                      code:kJSONModelErrorInvalidData
-                                  userInfo:@{NSLocalizedDescriptionKey:@"Invalid JSON data. The JSON type mismatches the expected type. Check the error user information.",kJSONModelTypeMismatch:mismatchDescription}];
-}
-
-+(id)errorBadResponse
-{
-    return [JSONModelError errorWithDomain:JSONModelErrorDomain
-                                      code:kJSONModelErrorBadResponse
-                                  userInfo:@{NSLocalizedDescriptionKey:@"Bad network response. Probably the JSON URL is unreachable."}];
-}
-
-+(id)errorBadJSON
-{
-    return [JSONModelError errorWithDomain:JSONModelErrorDomain
-                                      code:kJSONModelErrorBadJSON
-                                  userInfo:@{NSLocalizedDescriptionKey:@"Malformed JSON. Check the JSONModel data input."}];    
-}
-
-+(id)errorModelIsInvalid
-{
-    return [JSONModelError errorWithDomain:JSONModelErrorDomain
-                                      code:kJSONModelErrorModelIsInvalid
-                                  userInfo:@{NSLocalizedDescriptionKey:@"Model does not validate. The custom validation for the input data failed."}];
-}
-
-+(id)errorInputIsNil
-{
-    return [JSONModelError errorWithDomain:JSONModelErrorDomain
-                                      code:kJSONModelErrorNilInput
-                                  userInfo:@{NSLocalizedDescriptionKey:@"Initializing model with nil input object."}];
-}
-
-- (instancetype)errorByPrependingKeyPathComponent:(NSString*)component
-{
-    // Create a mutable  copy of the user info so that we can add to it and update it
-    NSMutableDictionary* userInfo = [self.userInfo mutableCopy];
-
-    // Create or update the key-path
-    NSString* existingPath = userInfo[kJSONModelKeyPath];
-    NSString* separator = [existingPath hasPrefix:@"["] ? @"" : @".";
-    NSString* updatedPath = (existingPath == nil) ? component : [component stringByAppendingFormat:@"%@%@", separator, existingPath];
-    userInfo[kJSONModelKeyPath] = updatedPath;
-
-    // Create the new error
-    return [JSONModelError errorWithDomain:self.domain
-                                      code:self.code
-                                  userInfo:[NSDictionary dictionaryWithDictionary:userInfo]];
-}
-
-@end

+ 0 - 40
Benchmark/Vendor/JSONModel/JSONModelCategories/NSArray+JSONModel.h

@@ -1,40 +0,0 @@
-//
-//  NSArray+JSONModel.h
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-
-#import <Foundation/Foundation.h>
-#import "JSONModel.h"
-
-/**
- * Exposes invisible JSONModelArray methods
- */
-@interface NSArray(JSONModel)
-
-/**
- * Looks up the array's contents and tries to find a JSONModel object
- * with matching index property value to the indexValue param.
- * 
- * Will return nil if no matching model is found. Will return nil if there's no index property 
- * defined on the models found in the array (will sample the first object, assuming the array 
- * contains homogeneous collection of objects)
- *
- * @param indexValue the id value to search for
- * @return the found model or nil
- * @exception NSException throws exception if you call this method on an instance, which is not actually a JSONModelArray
- */
-- (id)modelWithIndexValue:(id)indexValue;
-
-@end

+ 0 - 28
Benchmark/Vendor/JSONModel/JSONModelCategories/NSArray+JSONModel.m

@@ -1,28 +0,0 @@
-//
-//  NSArray+JSONModel.m
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-
-#import "NSArray+JSONModel.h"
-
-@implementation NSArray(JSONModel)
-
-- (id)modelWithIndexValue:(id)indexValue
-{
-    NSAssert(NO, @"call modelWithIndexValue: on a ConvertOnDemand property, which is defined like that: @property (strong, nonatomic) NSArray<MyModel, ConvertOnDemand>* list;");
-    return nil;
-}
-
-@end

+ 0 - 35
Benchmark/Vendor/JSONModel/JSONModelLib.h

@@ -1,35 +0,0 @@
-//
-//  JSONModelLib.h
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import <Foundation/Foundation.h>
-
-//JSONModel transformations
-#import "JSONValueTransformer.h"
-#import "JSONKeyMapper.h"
-
-//basic JSONModel classes
-#import "JSONModelError.h"
-#import "JSONModelClassProperty.h"
-#import "JSONModel.h"
-
-//network classes
-#import "JSONHTTPClient.h"
-#import "JSONModel+networking.h"
-#import "JSONAPI.h"
-
-//models array
-#import "NSArray+JSONModel.h"
-#import "JSONModelArray.h"

+ 0 - 90
Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONAPI.h

@@ -1,90 +0,0 @@
-//
-//  JSONAPI.h
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import <Foundation/Foundation.h>
-#import "JSONHTTPClient.h"
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-/**
- * @discussion Class for working with JSON APIs. It builds upon the JSONHTTPClient class
- * and facilitates making requests to the same web host. Also features helper
- * method for making calls to a JSON RPC service
- */
-@interface JSONAPI : NSObject
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-/** @name Configuring the API */
-/**
- * Sets the API url
- * @param base the API url as a string
- */
-+(void)setAPIBaseURLWithString:(NSString*)base;
-
-/**
- * Sets the default content type for the requests/responses
- * @param ctype The content-type as a string. Some possible types, 
- * depending on the service: application/json, text/json, x-application/javascript, etc.
- */
-+(void)setContentType:(NSString*)ctype;
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-/** @name Making GET API requests */
-/**
- * Makes an asynchronous GET request to the API
- * @param path the URL path to add to the base API URL for this HTTP call
- * @param params the variables to pass to the API
- * @param completeBlock a JSONObjectBlock block to execute upon completion
- */
-+(void)getWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock;
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-/** @name Making POST API requests */
-/**
- * Makes a POST request to the API
- * @param path the URL path to add to the base API URL for this HTTP call
- * @param params the variables to pass to the API
- * @param completeBlock a JSONObjectBlock block to execute upon completion
- */
-+(void)postWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock;
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-/** @name JSON RPC methods */
-/**
- * Makes an asynchronous JSON RPC request to the API. Read more: http://www.jsonrpc.org
- * @param method the HTTP method name; GET or POST only
- * @param args the list of arguments to pass to the API
- * @param completeBlock JSONObjectBlock to execute upon completion
- */
-+(void)rpcWithMethodName:(NSString*)method andArguments:(NSArray*)args completion:(JSONObjectBlock)completeBlock;
-
-/** @name JSON RPC (2.0) request method */
-/**
- * Makes an asynchronous JSON RPC 2.0 request to the API. Read more: http://www.jsonrpc.org
- * @param method the HTTP method name; GET or POST only
- * @param params the params to pass to the API - an NSArray or an NSDictionary, 
- * depending whether you're using named or unnamed parameters
- * @param completeBlock JSONObjectBlock to execute upon completion
- */
-+(void)rpc2WithMethodName:(NSString*)method andParams:(id)params completion:(JSONObjectBlock)completeBlock;
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-@end

+ 0 - 152
Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONAPI.m

@@ -1,152 +0,0 @@
-//
-//  JSONAPI.m
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import "JSONAPI.h"
-
-#pragma mark - helper error model class
-@interface JSONAPIRPCErrorModel: JSONModel
-@property (assign, nonatomic) int code;
-@property (strong, nonatomic) NSString* message;
-@property (strong, nonatomic) id<Optional> data;
-@end
-
-#pragma mark - static variables
-
-static JSONAPI* sharedInstance = nil;
-static long jsonRpcId = 0;
-
-#pragma mark - JSONAPI() private interface
-
-@interface JSONAPI ()
-@property (strong, nonatomic) NSString* baseURLString;
-@end
-
-#pragma mark - JSONAPI implementation
-
-@implementation JSONAPI
-
-#pragma mark - initialize
-
-+(void)initialize
-{
-    static dispatch_once_t once;
-    dispatch_once(&once, ^{
-        sharedInstance = [[JSONAPI alloc] init];
-    });
-}
-
-#pragma mark - api config methods
-
-+(void)setAPIBaseURLWithString:(NSString*)base
-{
-    sharedInstance.baseURLString = base;
-}
-
-+(void)setContentType:(NSString*)ctype
-{
-    [JSONHTTPClient setRequestContentType: ctype];
-}
-
-#pragma mark - GET methods
-+(void)getWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock
-{
-    NSString* fullURL = [NSString stringWithFormat:@"%@%@", sharedInstance.baseURLString, path];
-    
-    [JSONHTTPClient getJSONFromURLWithString: fullURL params:params completion:^(NSDictionary *json, JSONModelError *e) {
-        completeBlock(json, e);
-    }];
-}
-
-#pragma mark - POST methods
-+(void)postWithPath:(NSString*)path andParams:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock
-{
-    NSString* fullURL = [NSString stringWithFormat:@"%@%@", sharedInstance.baseURLString, path];
-    
-    [JSONHTTPClient postJSONFromURLWithString: fullURL params:params completion:^(NSDictionary *json, JSONModelError *e) {
-        completeBlock(json, e);
-    }];
-}
-
-#pragma mark - RPC methods
-+(void)__rpcRequestWithObject:(id)jsonObject completion:(JSONObjectBlock)completeBlock
-{
-    
-    NSData* jsonRequestData = [NSJSONSerialization dataWithJSONObject:jsonObject
-                                                              options:kNilOptions
-                                                                error:nil];
-    NSString* jsonRequestString = [[NSString alloc] initWithData:jsonRequestData encoding: NSUTF8StringEncoding];
-
-    NSAssert(sharedInstance.baseURLString, @"API base URL not set");
-    [JSONHTTPClient postJSONFromURLWithString: sharedInstance.baseURLString
-                                   bodyString: jsonRequestString
-                                   completion:^(NSDictionary *json, JSONModelError* e) {
-
-                                       if (completeBlock) {
-                                           //handle the rpc response
-                                           NSDictionary* result = json[@"result"];
-
-                                           if (!result) {
-                                               JSONAPIRPCErrorModel* error = [[JSONAPIRPCErrorModel alloc] initWithDictionary:json[@"error"] error:nil];
-                                               if (error) {
-                                                   //custom server error
-                                                   if (!error.message) error.message = @"Generic json rpc error";
-                                                   e = [JSONModelError errorWithDomain:JSONModelErrorDomain
-                                                                                  code:error.code
-                                                                              userInfo: @{ NSLocalizedDescriptionKey : error.message}];
-                                               } else {
-                                                   //generic error
-                                                   e = [JSONModelError errorBadResponse];
-                                               }
-                                           }
-                                           
-                                           //invoke the callback
-                                           completeBlock(result, e);
-                                       }
-                                   }];
-}
-
-+(void)rpcWithMethodName:(NSString*)method andArguments:(NSArray*)args completion:(JSONObjectBlock)completeBlock
-{
-    NSAssert(method, @"No method specified");
-    if (!args) args = @[];
-    
-    [self __rpcRequestWithObject:@{
-                                  //rpc 1.0
-                                  @"id": @(++jsonRpcId),
-                                  @"params": args,
-                                  @"method": method
-     } completion:completeBlock];
-}
-
-+(void)rpc2WithMethodName:(NSString*)method andParams:(id)params completion:(JSONObjectBlock)completeBlock
-{
-    NSAssert(method, @"No method specified");
-    if (!params) params = @[];
-    
-    [self __rpcRequestWithObject:@{
-                                  //rpc 2.0
-                                  @"jsonrpc": @"2.0",
-                                  @"id": @(++jsonRpcId),
-                                  @"params": params,
-                                  @"method": method
-     } completion:completeBlock];
-}
-
-@end
-
-#pragma mark - helper rpc error model class implementation
-@implementation JSONAPIRPCErrorModel
-@end

+ 0 - 175
Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONHTTPClient.h

@@ -1,175 +0,0 @@
-//
-//  JSONModelHTTPClient.h
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import "JSONModel.h"
-
-#pragma mark - definitions
-
-/**
- * HTTP Request methods
- */
-extern NSString* const kHTTPMethodGET;
-extern NSString* const kHTTPMethodPOST;
-
-/**
- * Content-type strings
- */
-extern NSString* const kContentTypeAutomatic;
-extern NSString* const kContentTypeJSON;
-extern NSString* const kContentTypeWWWEncoded;
-
-/**
- * A block type to handle incoming JSON object and an error. 
- * You pass it to methods which fetch JSON asynchronously. When the operation is finished
- * you receive back the fetched JSON (or nil) and an error (or nil)
- *
- * @param json object derived from a JSON string
- * @param err JSONModelError or nil
- */
-typedef void (^JSONObjectBlock)(id json, JSONModelError* err);
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark - configuration methods
-
-/**
- * @discussion A very thin HTTP client that can do GET and POST HTTP requests.
- * It fetches only JSON data and also deserializes it using NSJSONSerialization.
- */
-@interface JSONHTTPClient : NSObject
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-
-/** @name HTTP Client configuration */
-/**
- * Returns a modifiable dictionary of the client's default HTTP headers.
- * @result A mutable dictionary of pairs - HTTP header names and values.
- * @discussion You can use the result to modify the http client headers like so:
- * <pre>
- * NSMutableDictionary* headers = [JSONHTTPClient requestHeaders];
- * headers[@"APIToken"] = @"MySecretTokenValue";
- * </pre>
- */
-+(NSMutableDictionary*)requestHeaders;
-
-/**
- * Sets the default encoding of the request body.
- * See NSStringEncoding for a list of supported encodings
- * @param encoding text encoding constant
- */
-+(void)setDefaultTextEncoding:(NSStringEncoding)encoding;
-
-/**
- * Sets the policies for caching HTTP data
- * See NSURLRequestCachePolicy for a list of the pre-defined policies
- * @param policy the caching policy
- */
-+(void)setCachingPolicy:(NSURLRequestCachePolicy)policy;
-
-/**
- * Sets the timeout for network calls
- * @param seconds the amount of seconds to wait before considering the call failed
- */
-+(void)setTimeoutInSeconds:(int)seconds;
-
-/**
- * A method to set the default content type of the request body
- * By default the content type is set to kContentTypeAutomatic
- * which checks the body request and decides between "application/json"
- * and "application/x-www-form-urlencoded"
- */
-+(void)setRequestContentType:(NSString*)contentTypeString;
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark - GET asynchronous JSON calls
-
-/** @name Making asynchronous HTTP requests */
-/**
- * Makes GET request to the given URL address and fetches a JSON response.
- * @param urlString the URL as a string
- * @param completeBlock JSONObjectBlock to execute upon completion
- */
-+(void)getJSONFromURLWithString:(NSString*)urlString completion:(JSONObjectBlock)completeBlock;
-
-/**
- * Makes GET request to the given URL address and fetches a JSON response. Sends the params as a query string variables.
- * @param urlString the URL as a string
- * @param params a dictionary of key / value pairs to be send as variables to the request
- * @param completeBlock JSONObjectBlock to execute upon completion
- */
-+(void)getJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock;
-
-/**
- * Makes a request to the given URL address and fetches a JSON response.
- * @param urlString the URL as a string
- * @param method the method of the request as a string
- * @param params a dictionary of key / value pairs to be send as variables to the request
- * @param bodyString the body of the POST request as a string
- * @param completeBlock JSONObjectBlock to execute upon completion
- */
-+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary*)params orBodyString:(NSString*)bodyString completion:(JSONObjectBlock)completeBlock;
-
-/**
- * Makes a request to the given URL address and fetches a JSON response.
- * @param urlString the URL as a string
- * @param method the method of the request as a string
- * @param params a dictionary of key / value pairs to be send as variables to the request
- * @param bodyString the body of the POST request as a string
- * @param headers the headers to set on the request - overrides those in +requestHeaders
- * @param completeBlock JSONObjectBlock to execute upon completion
- */
-+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary*)params orBodyString:(NSString*)bodyString headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock;
-
-/**
- * Makes a request to the given URL address and fetches a JSON response.
- * @param urlString the URL as a string
- * @param method the method of the request as a string
- * @param params a dictionary of key / value pairs to be send as variables to the request
- * @param bodyData the body of the POST request as raw binary data
- * @param headers the headers to set on the request - overrides those in +requestHeaders
- * @param completeBlock JSONObjectBlock to execute upon completion
- */
-+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary *)params orBodyData:(NSData*)bodyData headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock;
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-#pragma mark - POST asynchronous JSON calls
-
-/**
- * Makes POST request to the given URL address and fetches a JSON response. Sends the bodyString param as the POST request body.
- * @param urlString the URL as a string
- * @param params a dictionary of key / value pairs to be send as variables to the request
- * @param completeBlock JSONObjectBlock to execute upon completion
- */
-+(void)postJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock;
-
-/**
- * Makes POST request to the given URL address and fetches a JSON response. Sends the bodyString param as the POST request body.
- * @param urlString the URL as a string
- * @param bodyString the body of the POST request as a string
- * @param completeBlock JSONObjectBlock to execute upon completion
- */
-+(void)postJSONFromURLWithString:(NSString*)urlString bodyString:(NSString*)bodyString completion:(JSONObjectBlock)completeBlock;
-
-/**
- * Makes POST request to the given URL address and fetches a JSON response. Sends the bodyString param as the POST request body.
- * @param urlString the URL as a string
- * @param bodyData the body of the POST request as an NSData object
- * @param completeBlock JSONObjectBlock to execute upon completion
- */
-+(void)postJSONFromURLWithString:(NSString*)urlString bodyData:(NSData*)bodyData completion:(JSONObjectBlock)completeBlock;
-
-
-@end

+ 0 - 369
Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONHTTPClient.m

@@ -1,369 +0,0 @@
-//
-//  JSONModelHTTPClient.m
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import "JSONHTTPClient.h"
-
-typedef void (^RequestResultBlock)(NSData *data, JSONModelError *error);
-
-#pragma mark - constants
-NSString* const kHTTPMethodGET = @"GET";
-NSString* const kHTTPMethodPOST = @"POST";
-
-NSString* const kContentTypeAutomatic    = @"jsonmodel/automatic";
-NSString* const kContentTypeJSON         = @"application/json";
-NSString* const kContentTypeWWWEncoded   = @"application/x-www-form-urlencoded";
-
-#pragma mark - static variables
-
-/**
- * Defaults for HTTP requests
- */
-static NSStringEncoding defaultTextEncoding = NSUTF8StringEncoding;
-static NSURLRequestCachePolicy defaultCachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
-
-static int defaultTimeoutInSeconds = 60;
-
-/**
- * Custom HTTP headers to send over with *each* request
- */
-static NSMutableDictionary* requestHeaders = nil;
-
-/**
- * Default request content type
- */
-static NSString* requestContentType = nil;
-
-#pragma mark - implementation
-@implementation JSONHTTPClient
-
-#pragma mark - initialization
-+(void)initialize
-{
-    static dispatch_once_t once;
-    dispatch_once(&once, ^{
-        requestHeaders = [NSMutableDictionary dictionary];
-        requestContentType = kContentTypeAutomatic;
-    });
-}
-
-#pragma mark - configuration methods
-+(NSMutableDictionary*)requestHeaders
-{
-    return requestHeaders;
-}
-
-+(void)setDefaultTextEncoding:(NSStringEncoding)encoding
-{
-    defaultTextEncoding = encoding;
-}
-
-+(void)setCachingPolicy:(NSURLRequestCachePolicy)policy
-{
-    defaultCachePolicy = policy;
-}
-
-+(void)setTimeoutInSeconds:(int)seconds
-{
-    defaultTimeoutInSeconds = seconds;
-}
-
-+(void)setRequestContentType:(NSString*)contentTypeString
-{
-    requestContentType = contentTypeString;
-}
-
-#pragma mark - helper methods
-+(NSString*)contentTypeForRequestString:(NSString*)requestString
-{
-    //fetch the charset name from the default string encoding
-    NSString* contentType = requestContentType;
-
-    if (requestString.length>0 && [contentType isEqualToString:kContentTypeAutomatic]) {
-        //check for "eventual" JSON array or dictionary
-        NSString* firstAndLastChar = [NSString stringWithFormat:@"%@%@",
-                                      [requestString substringToIndex:1],
-                                      [requestString substringFromIndex: requestString.length -1]
-                                      ];
-        
-        if ([firstAndLastChar isEqualToString:@"{}"] || [firstAndLastChar isEqualToString:@"[]"]) {
-            //guessing for a JSON request
-            contentType = kContentTypeJSON;
-        } else {
-            //fallback to www form encoded params
-            contentType = kContentTypeWWWEncoded;
-        }
-    }
-
-    //type is set, just add charset
-    NSString *charset = (NSString *)CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding));
-    return [NSString stringWithFormat:@"%@; charset=%@", contentType, charset];
-}
-
-+(NSString*)urlEncode:(id<NSObject>)value
-{
-    //make sure param is a string
-    if ([value isKindOfClass:[NSNumber class]]) {
-        value = [(NSNumber*)value stringValue];
-    }
-    
-    NSAssert([value isKindOfClass:[NSString class]], @"request parameters can be only of NSString or NSNumber classes. '%@' is of class %@.", value, [value class]);
-
-    NSString *str = (NSString *)value;
-
-#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9
-    return [str stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-
-#else
-    return (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(
-                                                                                 NULL,
-                                                                                 (__bridge CFStringRef)str,
-                                                                                 NULL,
-                                                                                 (CFStringRef)@"!*'();:@&=+$,/?%#[]",
-                                                                                 kCFStringEncodingUTF8));
-#endif
-}
-
-#pragma mark - networking worker methods
-+(void)requestDataFromURL:(NSURL*)url method:(NSString*)method requestBody:(NSData*)bodyData headers:(NSDictionary*)headers handler:(RequestResultBlock)handler
-{
-    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL: url
-                                                                cachePolicy: defaultCachePolicy
-                                                            timeoutInterval: defaultTimeoutInSeconds];
-	[request setHTTPMethod:method];
-
-    if ([requestContentType isEqualToString:kContentTypeAutomatic]) {
-        //automatic content type
-        if (bodyData) {
-            NSString *bodyString = [[NSString alloc] initWithData:bodyData encoding:NSUTF8StringEncoding];
-            [request setValue: [self contentTypeForRequestString: bodyString] forHTTPHeaderField:@"Content-type"];
-        }
-    } else {
-        //user set content type
-        [request setValue: requestContentType forHTTPHeaderField:@"Content-type"];
-    }
-    
-    //add all the custom headers defined
-    for (NSString* key in [requestHeaders allKeys]) {
-        [request setValue:requestHeaders[key] forHTTPHeaderField:key];
-    }
-    
-    //add the custom headers
-    for (NSString* key in [headers allKeys]) {
-        [request setValue:headers[key] forHTTPHeaderField:key];
-    }
-    
-    if (bodyData) {
-        [request setHTTPBody: bodyData];
-        [request setValue:[NSString stringWithFormat:@"%lu", (unsigned long)bodyData.length] forHTTPHeaderField:@"Content-Length"];
-    }
-
-    void (^completionHandler)(NSData *, NSURLResponse *, NSError *) = ^(NSData *data, NSURLResponse *origResponse, NSError *origError) {
-        NSHTTPURLResponse *response = (NSHTTPURLResponse *)origResponse;
-        JSONModelError *error = nil;
-
-        //convert an NSError to a JSONModelError
-        if (origError) {
-            error = [JSONModelError errorWithDomain:origError.domain code:origError.code userInfo:origError.userInfo];
-        }
-
-        //special case for http error code 401
-        if (error.code == NSURLErrorUserCancelledAuthentication) {
-            response = [[NSHTTPURLResponse alloc] initWithURL:url statusCode:401 HTTPVersion:@"HTTP/1.1" headerFields:@{}];
-        }
-
-        //if not OK status set the err to a JSONModelError instance
-        if (!error && (response.statusCode >= 300 || response.statusCode < 200)) {
-            error = [JSONModelError errorBadResponse];
-        }
-
-        //if there was an error, assign the response to the JSONModel instance
-        if (error) {
-            error.httpResponse = [response copy];
-        }
-
-        //empty respone, return nil instead
-        if (!data.length) {
-            data = nil;
-        }
-        
-        handler(data, error);
-    };
-
-    //fire the request
-
-#if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10
-    NSURLSessionTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:completionHandler];
-    [task resume];
-#else
-    NSOperationQueue *queue = [NSOperationQueue new];
-
-    [NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
-        completionHandler(data, response, error);
-    }];
-#endif
-}
-
-+(void)requestDataFromURL:(NSURL*)url method:(NSString*)method params:(NSDictionary*)params headers:(NSDictionary*)headers handler:(RequestResultBlock)handler
-{
-    //create the request body
-    NSMutableString* paramsString = nil;
-
-    if (params) {
-        //build a simple url encoded param string
-        paramsString = [NSMutableString stringWithString:@""];
-        for (NSString* key in [[params allKeys] sortedArrayUsingSelector:@selector(compare:)]) {
-            [paramsString appendFormat:@"%@=%@&", key, [self urlEncode:params[key]] ];
-        }
-        if ([paramsString hasSuffix:@"&"]) {
-            paramsString = [[NSMutableString alloc] initWithString: [paramsString substringToIndex: paramsString.length-1]];
-        }
-    }
-    
-    //set the request params
-    if ([method isEqualToString:kHTTPMethodGET] && params) {
-
-        //add GET params to the query string
-        url = [NSURL URLWithString:[NSString stringWithFormat: @"%@%@%@",
-                                    [url absoluteString],
-                                    [url query] ? @"&" : @"?",
-                                    paramsString
-                                    ]];
-    }
-    
-    //call the more general synq request method
-    [self requestDataFromURL: url
-                      method: method
-                 requestBody: [method isEqualToString:kHTTPMethodPOST]?[paramsString dataUsingEncoding:NSUTF8StringEncoding]:nil
-                     headers: headers
-                       handler:handler];
-}
-
-#pragma mark - Async network request
-+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary*)params orBodyString:(NSString*)bodyString completion:(JSONObjectBlock)completeBlock
-{
-    [self JSONFromURLWithString:urlString
-                         method:method
-                         params:params
-                   orBodyString:bodyString
-                        headers:nil
-                     completion:completeBlock];
-}
-
-+(void)JSONFromURLWithString:(NSString *)urlString method:(NSString *)method params:(NSDictionary *)params orBodyString:(NSString *)bodyString headers:(NSDictionary *)headers completion:(JSONObjectBlock)completeBlock
-{
-    [self JSONFromURLWithString:urlString
-                         method:method
-                         params:params
-                     orBodyData:[bodyString dataUsingEncoding:NSUTF8StringEncoding]
-                        headers:headers
-                     completion:completeBlock];
-}
-
-+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary *)params orBodyData:(NSData*)bodyData headers:(NSDictionary*)headers completion:(JSONObjectBlock)completeBlock
-{
-    RequestResultBlock handler = ^(NSData *responseData, JSONModelError *error) {
-        id jsonObject = nil;
-
-        //step 3: if there's no response so far, return a basic error
-        if (!responseData && !error) {
-            //check for false response, but no network error
-            error = [JSONModelError errorBadResponse];
-        }
-
-        //step 4: if there's a response at this and no errors, convert to object
-        if (error==nil) {
-			// Note: it is possible to have a valid response with empty response data (204 No Content).
-			// So only create the JSON object if there is some response data.
-			if(responseData.length > 0)
-			{
-				//convert to an object
-				jsonObject = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error];
-			}
-        }
-        //step 4.5: cover an edge case in which meaningful content is return along an error HTTP status code
-        else if (error && responseData && jsonObject==nil) {
-            //try to get the JSON object, while preserving the original error object
-            jsonObject = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:nil];
-            //keep responseData just in case it contains error information
-            error.responseData = responseData;
-        }
-        
-        //step 5: invoke the complete block
-        dispatch_async(dispatch_get_main_queue(), ^{
-            if (completeBlock) {
-                completeBlock(jsonObject, error);
-            }
-        });
-    };
-
-    NSURL *url = [NSURL URLWithString:urlString];
-
-    if (bodyData) {
-        [self requestDataFromURL:url method:method requestBody:bodyData headers:headers handler:handler];
-    } else {
-        [self requestDataFromURL:url method:method params:params headers:headers handler:handler];
-    }
-}
-
-#pragma mark - request aliases
-+(void)getJSONFromURLWithString:(NSString*)urlString completion:(JSONObjectBlock)completeBlock
-{
-    [self JSONFromURLWithString:urlString method:kHTTPMethodGET
-                         params:nil
-                   orBodyString:nil completion:^(id json, JSONModelError* e) {
-                       if (completeBlock) completeBlock(json, e);
-                   }];
-}
-
-+(void)getJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock
-{
-    [self JSONFromURLWithString:urlString method:kHTTPMethodGET
-                         params:params
-                   orBodyString:nil completion:^(id json, JSONModelError* e) {
-                       if (completeBlock) completeBlock(json, e);
-                   }];
-}
-
-+(void)postJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock
-{
-    [self JSONFromURLWithString:urlString method:kHTTPMethodPOST
-                         params:params
-                   orBodyString:nil completion:^(id json, JSONModelError* e) {
-                       if (completeBlock) completeBlock(json, e);
-                   }];
-
-}
-
-+(void)postJSONFromURLWithString:(NSString*)urlString bodyString:(NSString*)bodyString completion:(JSONObjectBlock)completeBlock
-{
-    [self JSONFromURLWithString:urlString method:kHTTPMethodPOST
-                         params:nil
-                   orBodyString:bodyString completion:^(id json, JSONModelError* e) {
-                       if (completeBlock) completeBlock(json, e);
-                   }];
-}
-
-+(void)postJSONFromURLWithString:(NSString*)urlString bodyData:(NSData*)bodyData completion:(JSONObjectBlock)completeBlock
-{
-    [self JSONFromURLWithString:urlString method:kHTTPMethodPOST
-                         params:nil
-                   orBodyString:[[NSString alloc] initWithData:bodyData encoding:defaultTextEncoding]
-                                 completion:^(id json, JSONModelError* e) {
-                       if (completeBlock) completeBlock(json, e);
-                   }];
-}
-
-@end

+ 0 - 66
Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONModel+networking.h

@@ -1,66 +0,0 @@
-//
-//  JSONModel+networking.h
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import "JSONModel.h"
-#import "JSONHTTPClient.h"
-
-typedef void (^JSONModelBlock)(id model, JSONModelError* err);
-
-/**
- * The JSONModel(networking) class category adds networking to JSONModel.
- * It adds initFromURLWithString: initializer, which makes a GET http request 
- * to the URL given and initializes the model with the returned JSON.
- * Use #import "JSONModel+networking.h" to import networking capabilities.
- */
-@interface JSONModel(Networking)
-
-@property (assign, nonatomic) BOOL isLoading;
-/** @name Asynchronously create a model over the network */
-/**
- * Asynchronously create a model over the network. Create a new model instance and initialize it with the JSON fetched from the given URL
- * @param urlString the absolute URL address of the JSON feed as a string
- * @param completeBlock JSONModelBlock executed upon completion. The JSONModelBlock type is defined as: void (^JSONModelBlock)(JSONModel* model, JSONModelError* e); the first parameter is the initialized model or nil, 
- * and second parameter holds the model initialization error, if any
- */
--(instancetype)initFromURLWithString:(NSString *)urlString completion:(JSONModelBlock)completeBlock;
-
-/**
- * Asynchronously gets the contents of a URL and constructs a JSONModel object from the response.
- * The constructed JSONModel object passed as the first parameter to the completion block will be of the same
- * class as the receiver. So call this method on yourJSONModel sub-class rather than directly on JSONModel.
- * @param	urlString		The absolute URL of the JSON resource, as a string
- * @param	completeBlock	The block to be called upon completion.
- *							JSONModelBlock type is defined as: void (^JSONModelBlock)(JSONModel* model, JSONModelError* err);
- *							The first parameter is the initialized model (of the same JSONModel sub-class as the receiver) or nil if there was an error;
- * 							The second parameter is the initialization error, if any.
- */
-+ (void)getModelFromURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock;
-
-/**
- * Asynchronously posts a JSONModel object (as JSON) to a URL and constructs a JSONModel object from the response.
- * The constructed JSONModel object passed as the first parameter to the completion block will be of the same
- * class as the receiver. So call this method on yourJSONModel sub-class rather than directly on JSONModel.
- * @param	post			A JSONModel object that will be converted to JSON and sent as the POST data to the HTTP request.
- * @param	urlString		The absolute URL of the JSON resource, as a string
- * @param	completeBlock	The block to be called upon completion.
- *							JSONModelBlock type is defined as: void (^JSONModelBlock)(JSONModel* model, JSONModelError* err);
- *							The first parameter is the initialized model (of the same JSONModel sub-class as the receiver) or nil if there was an error;
- * 							The second parameter is the initialization error, if any.
- */
-+ (void)postModel:(JSONModel*)post toURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock;
-
-
-@end

+ 0 - 109
Benchmark/Vendor/JSONModel/JSONModelNetworking/JSONModel+networking.m

@@ -1,109 +0,0 @@
-//
-//  JSONModel+networking.m
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import "JSONModel+networking.h"
-#import "JSONHTTPClient.h"
-
-BOOL _isLoading;
-
-@implementation JSONModel(Networking)
-
-@dynamic isLoading;
-
--(BOOL)isLoading
-{
-    return _isLoading;
-}
-
--(void)setIsLoading:(BOOL)isLoading
-{
-    _isLoading = isLoading;
-}
-
--(instancetype)initFromURLWithString:(NSString *)urlString completion:(JSONModelBlock)completeBlock
-{
-    id placeholder = [super init];
-    __block id blockSelf = self;
-    
-    if (placeholder) {
-        //initialization
-        self.isLoading = YES;
-        
-        [JSONHTTPClient getJSONFromURLWithString:urlString
-                                      completion:^(NSDictionary *json, JSONModelError* e) {
-                                          
-                                          JSONModelError* initError = nil;
-                                          blockSelf = [self initWithDictionary:json error:&initError];
-                                          
-                                          if (completeBlock) {
-                                              dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{
-                                                  completeBlock(blockSelf, e?e:initError );
-                                              });
-                                          }
-                                          
-                                          self.isLoading = NO;
-                                          
-                                      }];
-    }
-    return placeholder;
-}
-
-+ (void)getModelFromURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock
-{
-	[JSONHTTPClient getJSONFromURLWithString:urlString
-								  completion:^(NSDictionary* jsonDict, JSONModelError* err)
-	{
-		JSONModel* model = nil;
-
-		if(err == nil)
-		{
-			model = [[self alloc] initWithDictionary:jsonDict error:&err];
-		}
-
-		if(completeBlock != nil)
-		{
-			dispatch_async(dispatch_get_main_queue(), ^
-			{
-				completeBlock(model, err);
-			});
-		}
-    }];
-}
-
-+ (void)postModel:(JSONModel*)post toURLWithString:(NSString*)urlString completion:(JSONModelBlock)completeBlock
-{
-	[JSONHTTPClient postJSONFromURLWithString:urlString
-								   bodyString:[post toJSONString]
-								   completion:^(NSDictionary* jsonDict, JSONModelError* err)
-	{
-		JSONModel* model = nil;
-
-		if(err == nil)
-		{
-			model = [[self alloc] initWithDictionary:jsonDict error:&err];
-		}
-
-		if(completeBlock != nil)
-		{
-			dispatch_async(dispatch_get_main_queue(), ^
-			{
-				completeBlock(model, err);
-			});
-		}
-	}];
-}
-
-@end

+ 0 - 102
Benchmark/Vendor/JSONModel/JSONModelTransformations/JSONKeyMapper.h

@@ -1,102 +0,0 @@
-//
-//  JSONKeyMapper.h
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import <Foundation/Foundation.h>
-
-typedef NSString* (^JSONModelKeyMapBlock)(NSString* keyName);
-
-/**
- * **You won't need to create or store instances of this class yourself.** If you want your model
- * to have different property names than the JSON feed keys, look below on how to 
- * make your model use a key mapper.
- *
- * For example if you consume JSON from twitter
- * you get back underscore_case style key names. For example:
- *
- * <pre>"profile_sidebar_border_color": "0094C2",
- * "profile_background_tile": false,</pre>
- *
- * To comply with Obj-C accepted camelCase property naming for your classes,
- * you need to provide mapping between JSON keys and ObjC property names.
- * 
- * In your model overwrite the +(JSONKeyMapper*)keyMapper method and provide a JSONKeyMapper
- * instance to convert the key names for your model.
- * 
- * If you need custom mapping it's as easy as:
- * <pre>
- * +(JSONKeyMapper*)keyMapper {
- * &nbsp; return [[JSONKeyMapper&nbsp;alloc]&nbsp;initWithDictionary:@{@"crazy_JSON_name":@"myCamelCaseName"}];
- * }
- * </pre>
- * In case you want to handle underscore_case, **use the predefined key mapper**, like so:
- * <pre>
- * +(JSONKeyMapper*)keyMapper {
- * &nbsp; return [JSONKeyMapper&nbsp;mapperFromUnderscoreCaseToCamelCase];
- * }
- * </pre>
- */
-@interface JSONKeyMapper : NSObject
-
-/** @name Name converters */
-/** Block, which takes in a JSON key and converts it to the corresponding property name */
-@property (readonly, nonatomic) JSONModelKeyMapBlock JSONToModelKeyBlock;
-
-/** Block, which takes in a property name and converts it to the corresponding JSON key name */
-@property (readonly, nonatomic) JSONModelKeyMapBlock modelToJSONKeyBlock;
-
-/** Combined converter method
-* @param value the source name
-* @param importing YES invokes JSONToModelKeyBlock, NO - modelToJSONKeyBlock
-* @return JSONKeyMapper instance
-*/
--(NSString*)convertValue:(NSString*)value isImportingToModel:(BOOL)importing;
-
-/** @name Creating a key mapper */
-
-/**
- * Creates a JSONKeyMapper instance, based on the two blocks you provide this initializer.
- * The two parameters take in a JSONModelKeyMapBlock block:
- * <pre>NSString* (^JSONModelKeyMapBlock)(NSString* keyName)</pre>
- * The block takes in a string and returns the transformed (if at all) string.
- * @param toModel transforms JSON key name to your model property name
- * @param toJSON transforms your model property name to a JSON key
- */
--(instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel
-                       modelToJSONBlock:(JSONModelKeyMapBlock)toJSON;
-
-/**
- * Creates a JSONKeyMapper instance, based on the mapping you provide
- * in the map parameter. Use the JSON key names as keys, your JSONModel 
- * property names as values.
- * @param map map dictionary, in the format: <pre>@{@"crazy_JSON_name":@"myCamelCaseName"}</pre>
- * @return JSONKeyMapper instance
- */
--(instancetype)initWithDictionary:(NSDictionary*)map;
-
-/**
- * Creates a JSONKeyMapper, which converts underscore_case to camelCase and vice versa.
- */
-+(instancetype)mapperFromUnderscoreCaseToCamelCase;
-
-+(instancetype)mapperFromUpperCaseToLowerCase;
-
-/**
- * Creates a JSONKeyMapper based on a built-in JSONKeyMapper, with specific exceptions.
- * Use the original JSON key names as keys, and your JSONModel property names as values.
- */
-+ (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictionary *)exceptions;
-
-@end

+ 0 - 237
Benchmark/Vendor/JSONModel/JSONModelTransformations/JSONKeyMapper.m

@@ -1,237 +0,0 @@
-//
-//  JSONKeyMapper.m
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import "JSONKeyMapper.h"
-#import <libkern/OSAtomic.h>
-
-@interface JSONKeyMapper()
-@property (nonatomic, strong) NSMutableDictionary *toModelMap;
-@property (nonatomic, strong) NSMutableDictionary *toJSONMap;
-@property (nonatomic, assign) OSSpinLock lock;
-@end
-
-@implementation JSONKeyMapper
-
--(instancetype)init
-{
-    self = [super init];
-    if (self) {
-        //initialization
-        self.toModelMap = [NSMutableDictionary dictionary];
-        self.toJSONMap  = [NSMutableDictionary dictionary];
-    }
-    return self;
-}
-
--(instancetype)initWithJSONToModelBlock:(JSONModelKeyMapBlock)toModel
-                       modelToJSONBlock:(JSONModelKeyMapBlock)toJSON
-{
-    self = [self init];
-    
-    if (self) {
-        
-        __weak JSONKeyMapper* weakSelf = self;
-        
-        _JSONToModelKeyBlock = [^NSString* (NSString* keyName) {
-            
-            __strong JSONKeyMapper* strongSelf = weakSelf;
-
-            //try to return cached transformed key
-            if (strongSelf.toModelMap[keyName]) {
-                return strongSelf.toModelMap[keyName];
-            }
-            
-            //try to convert the key, and store in the cache
-            NSString* result = toModel(keyName);
-            
-            OSSpinLockLock(&strongSelf->_lock);
-            strongSelf.toModelMap[keyName] = result;
-            OSSpinLockUnlock(&strongSelf->_lock);
-            
-            return result;
-            
-        } copy];
-        
-        _modelToJSONKeyBlock = [^NSString* (NSString* keyName) {
-            
-            __strong JSONKeyMapper *strongSelf = weakSelf;
-            
-            //try to return cached transformed key
-            if (strongSelf.toJSONMap[keyName]) {
-                return strongSelf.toJSONMap[keyName];
-            }
-            
-            //try to convert the key, and store in the cache
-            NSString* result = toJSON(keyName);
-            
-            OSSpinLockLock(&strongSelf->_lock);
-            strongSelf.toJSONMap[keyName] = result;
-            OSSpinLockUnlock(&strongSelf->_lock);
-            
-            return result;
-            
-        } copy];
-        
-    }
-    
-    return self;
-}
-
--(instancetype)initWithDictionary:(NSDictionary *)map
-{
-    self = [super init];
-    if (self) {
-        
-        NSDictionary *userToModelMap = [map copy];
-        NSDictionary *userToJSONMap  = [self swapKeysAndValuesInDictionary:map];
-        
-        _JSONToModelKeyBlock = ^NSString *(NSString *keyName) {
-            NSString *result = [userToModelMap valueForKeyPath:keyName];
-            return result ? result : keyName;
-        };
-        
-        _modelToJSONKeyBlock = ^NSString *(NSString *keyName) {
-            NSString *result = [userToJSONMap valueForKeyPath:keyName];
-            return result ? result : keyName;
-        };
-    }
-    
-    return self;
-}
-
-- (NSDictionary *)swapKeysAndValuesInDictionary:(NSDictionary *)dictionary
-{
-    NSMutableDictionary *swapped = [NSMutableDictionary new];
-    
-    [dictionary enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
-        NSAssert([value isKindOfClass:[NSString class]], @"Expect keys and values to be NSString");
-        NSAssert([key isKindOfClass:[NSString class]], @"Expect keys and values to be NSString");
-        swapped[value] = key;
-    }];
-    
-    return swapped;
-}
-
--(NSString*)convertValue:(NSString*)value isImportingToModel:(BOOL)importing
-{
-    return !importing?_JSONToModelKeyBlock(value):_modelToJSONKeyBlock(value);
-}
-
-+(instancetype)mapperFromUnderscoreCaseToCamelCase
-{
-    JSONModelKeyMapBlock toModel = ^ NSString* (NSString* keyName) {
-
-        //bail early if no transformation required
-        if ([keyName rangeOfString:@"_"].location==NSNotFound) return keyName;
-
-        //derive camel case out of underscore case
-        NSString* camelCase = [keyName capitalizedString];
-        camelCase = [camelCase stringByReplacingOccurrencesOfString:@"_" withString:@""];
-        camelCase = [camelCase stringByReplacingCharactersInRange:NSMakeRange(0, 1) withString:[[camelCase substringToIndex:1] lowercaseString] ];
-        
-        return camelCase;
-    };
-
-    JSONModelKeyMapBlock toJSON = ^ NSString* (NSString* keyName) {
-        
-        NSMutableString* result = [NSMutableString stringWithString:keyName];
-        NSRange upperCharRange = [result rangeOfCharacterFromSet:[NSCharacterSet uppercaseLetterCharacterSet]];
-
-        //handle upper case chars
-        while ( upperCharRange.location!=NSNotFound) {
-
-            NSString* lowerChar = [[result substringWithRange:upperCharRange] lowercaseString];
-            [result replaceCharactersInRange:upperCharRange
-                                  withString:[NSString stringWithFormat:@"_%@", lowerChar]];
-            upperCharRange = [result rangeOfCharacterFromSet:[NSCharacterSet uppercaseLetterCharacterSet]];
-        }
-
-        //handle numbers
-        NSRange digitsRange = [result rangeOfCharacterFromSet:[NSCharacterSet decimalDigitCharacterSet]];
-        while ( digitsRange.location!=NSNotFound) {
-            
-            NSRange digitsRangeEnd = [result rangeOfString:@"\\D" options:NSRegularExpressionSearch range:NSMakeRange(digitsRange.location, result.length-digitsRange.location)];
-            if (digitsRangeEnd.location == NSNotFound) {
-                //spands till the end of the key name
-                digitsRangeEnd = NSMakeRange(result.length, 1);
-            }
-            
-            NSRange replaceRange = NSMakeRange(digitsRange.location, digitsRangeEnd.location - digitsRange.location);
-            NSString* digits = [result substringWithRange:replaceRange];
-            
-            [result replaceCharactersInRange:replaceRange withString:[NSString stringWithFormat:@"_%@", digits]];
-            digitsRange = [result rangeOfCharacterFromSet:[NSCharacterSet decimalDigitCharacterSet] options:kNilOptions range:NSMakeRange(digitsRangeEnd.location+1, result.length-digitsRangeEnd.location-1)];
-        }
-        
-        return result;
-    };
-
-    return [[self alloc] initWithJSONToModelBlock:toModel
-                                 modelToJSONBlock:toJSON];
-    
-}
-
-+(instancetype)mapperFromUpperCaseToLowerCase
-{
-    JSONModelKeyMapBlock toModel = ^ NSString* (NSString* keyName) {
-        NSString*lowercaseString = [keyName lowercaseString];
-        return lowercaseString;
-    };
-
-    JSONModelKeyMapBlock toJSON = ^ NSString* (NSString* keyName) {
-
-        NSString *uppercaseString = [keyName uppercaseString];
-
-        return uppercaseString;
-    };
-
-    return [[self alloc] initWithJSONToModelBlock:toModel
-                                 modelToJSONBlock:toJSON];
-
-}
-
-+ (instancetype)mapper:(JSONKeyMapper *)baseKeyMapper withExceptions:(NSDictionary *)exceptions
-{
-    NSArray *keys = exceptions.allKeys;
-    NSArray *values = [exceptions objectsForKeys:keys notFoundMarker:[NSNull null]];
-
-    NSDictionary *toModelMap = [NSDictionary dictionaryWithObjects:values forKeys:keys];
-    NSDictionary *toJsonMap = [NSDictionary dictionaryWithObjects:keys forKeys:values];
-
-    JSONModelKeyMapBlock toModel = ^NSString *(NSString *keyName) {
-        if (!keyName)
-            return nil;
-
-        if (toModelMap[keyName])
-            return toModelMap[keyName];
-
-        return baseKeyMapper.JSONToModelKeyBlock(keyName);
-    };
-
-    JSONModelKeyMapBlock toJson = ^NSString *(NSString *keyName) {
-        if (!keyName)
-            return nil;
-
-        if (toJsonMap[keyName])
-            return toJsonMap[keyName];
-
-        return baseKeyMapper.modelToJSONKeyBlock(keyName);
-    };
-
-    return [[self alloc] initWithJSONToModelBlock:toModel modelToJSONBlock:toJson];
-}
-
-@end

+ 0 - 230
Benchmark/Vendor/JSONModel/JSONModelTransformations/JSONValueTransformer.h

@@ -1,230 +0,0 @@
-//
-//  JSONValueTransformer.h
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import <Foundation/Foundation.h>
-#import "JSONModelArray.h"
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-#pragma mark - extern definitions
-/**
- * Boolean function to check for null values. Handy when you need to both check
- * for nil and [NSNUll null]
- */
-extern BOOL isNull(id value);
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-
-#pragma mark - JSONValueTransformer interface
-/**
- * **You don't need to call methods of this class manually.** 
- *
- * Class providing methods to transform values from one class to another.
- * You are given a number of built-in transformers, but you are encouraged to
- * extend this class with your own categories to add further value transformers.
- * Just few examples of what can you add to JSONValueTransformer: hex colors in JSON to UIColor,
- * hex numbers in JSON to NSNumber model properties, base64 encoded strings in JSON to UIImage properties, and more.
- *
- * The class is invoked by JSONModel while transforming incoming
- * JSON types into your target class property classes, and vice versa.
- * One static copy is create and store in the JSONModel class scope.
- */
-@interface JSONValueTransformer : NSObject
-
-@property (strong, nonatomic, readonly) NSDictionary* primitivesNames;
-
-/** @name Resolving cluster class names */
-/**
- * This method returns the umbrella class for any standard class cluster members.
- * For example returns NSString when given as input NSString, NSMutableString, __CFString and __CFConstantString
- * The method currently looksup a pre-defined list.
- * @param sourceClass the class to get the umbrella class for
- * @return Class
- */
-+(Class)classByResolvingClusterClasses:(Class)sourceClass;
-
-#pragma mark - NSMutableString <-> NSString
-/** @name Transforming to Mutable copies */
-/**
- * Transforms a string value to a mutable string value
- * @param string incoming string
- * @return mutable string
- */
--(NSMutableString*)NSMutableStringFromNSString:(NSString*)string;
-
-#pragma mark - NSMutableArray <-> NSArray
-/**
- * Transforms an array to a mutable array
- * @param array incoming array
- * @return mutable array
- */
--(NSMutableArray*)NSMutableArrayFromNSArray:(NSArray*)array;
-
-#pragma mark - NS(Mutable)Array <- JSONModelArray
-/**
- * Transforms an array to a JSONModelArray
- * @param array incoming array
- * @return JSONModelArray
- */
--(NSArray*)NSArrayFromJSONModelArray:(JSONModelArray*)array;
--(NSMutableArray*)NSMutableArrayFromJSONModelArray:(JSONModelArray*)array;
-
-#pragma mark - NSMutableDictionary <-> NSDictionary
-/**
- * Transforms a dictionary to a mutable dictionary
- * @param dict incoming dictionary
- * @return mutable dictionary
- */
--(NSMutableDictionary*)NSMutableDictionaryFromNSDictionary:(NSDictionary*)dict;
-
-#pragma mark - NSSet <-> NSArray
-/** @name Transforming Sets */
-/**
- * Transforms an array to a set
- * @param array incoming array
- * @return set with the array's elements
- */
--(NSSet*)NSSetFromNSArray:(NSArray*)array;
-
-/**
- * Transforms an array to a mutable set
- * @param array incoming array
- * @return mutable set with the array's elements
- */
--(NSMutableSet*)NSMutableSetFromNSArray:(NSArray*)array;
-
-/**
- * Transforms a set to an array
- * @param set incoming set
- * @return an array with the set's elements
- */
--(NSArray*)JSONObjectFromNSSet:(NSSet*)set;
-
-/**
- * Transforms a mutable set to an array
- * @param set incoming mutable set
- * @return an array with the set's elements
- */
--(NSArray*)JSONObjectFromNSMutableSet:(NSMutableSet*)set;
-
-#pragma mark - BOOL <-> number/string
-/** @name Transforming JSON types */
-/**
- * Transforms a number object to a bool number object
- * @param number the number to convert
- * @return the resulting number
- */
--(NSNumber*)BOOLFromNSNumber:(NSNumber*)number;
-
-/**
- * Transforms a number object to a bool number object
- * @param string the string value to convert, "0" converts to NO, everything else to YES
- * @return the resulting number
- */
--(NSNumber*)BOOLFromNSString:(NSString*)string;
-
-/**
- * Transforms a BOOL value to a bool number object
- * @param number an NSNumber value coming from the model
- * @return the result number
- */
--(NSNumber*)JSONObjectFromBOOL:(NSNumber*)number;
-
-#pragma mark - string <-> number
-/**
- * Transforms a string object to a number object
- * @param string the string to convert
- * @return the resulting number
- */
--(NSNumber*)NSNumberFromNSString:(NSString*)string;
-
-/**
- * Transforms a number object to a string object
- * @param number the number to convert
- * @return the resulting string
- */
--(NSString*)NSStringFromNSNumber:(NSNumber*)number;
-
-/**
- * Transforms a string object to a nsdecimalnumber object
- * @param string the string to convert
- * @return the resulting number
- */
--(NSDecimalNumber*)NSDecimalNumberFromNSString:(NSString*)string;
-
-/**
- * Transforms a nsdecimalnumber object to a string object
- * @param number the number to convert
- * @return the resulting string
- */
--(NSString*)NSStringFromNSDecimalNumber:(NSDecimalNumber*)number;
-
-
-#pragma mark - string <-> url
-/** @name Transforming URLs */
-/**
- * Transforms a string object to an NSURL object
- * @param string the string to convert
- * @return the resulting url object
- */
--(NSURL*)NSURLFromNSString:(NSString*)string;
-
-/**
- * Transforms an NSURL object to a string
- * @param url the url object to convert
- * @return the resulting string
- */
--(NSString*)JSONObjectFromNSURL:(NSURL*)url;
-
-#pragma mark - string <-> time zone
-
-/** @name Transforming NSTimeZone */
-/**
- * Transforms a string object to an NSTimeZone object
- * @param string the string to convert
- * @return the resulting NSTimeZone object
- */
-- (NSTimeZone *)NSTimeZoneFromNSString:(NSString*)string;
-
-/**
- * Transforms an NSTimeZone object to a string
- * @param timeZone the time zone object to convert
- * @return the resulting string
- */
-- (NSString *)JSONObjectFromNSTimeZone:(NSTimeZone *)timeZone;
-
-#pragma mark - string <-> date
-/** @name Transforming Dates */
-/**
- * The following two methods are not public. This way if there is a category on converting 
- * dates it'll override them. If there isn't a category the default methods found in the .m
- * file will be invoked. If these are public a warning is produced at the point of overriding
- * them in a category, so they have to stay hidden here.
- */
-
-//-(NSDate*)NSDateFromNSString:(NSString*)string;
-//-(NSString*)JSONObjectFromNSDate:(NSDate*)date;
-
-#pragma mark - number <-> date
-
-/**
- * Transforms a number to an NSDate object
- * @param number the number to convert
- * @return the resulting date
- */
-- (NSDate*)NSDateFromNSNumber:(NSNumber*)number;
-
-@end

+ 0 - 274
Benchmark/Vendor/JSONModel/JSONModelTransformations/JSONValueTransformer.m

@@ -1,274 +0,0 @@
-//
-//  JSONValueTransformer.m
-//
-//  @version 1.2
-//  @author Marin Todorov (http://www.underplot.com) and contributors
-//
-
-// Copyright (c) 2012-2015 Marin Todorov, Underplot ltd.
-// This code is distributed under the terms and conditions of the MIT license.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#import "JSONValueTransformer.h"
-#import "JSONModelArray.h"
-
-#pragma mark - functions
-extern BOOL isNull(id value)
-{
-    if (!value) return YES;
-    if ([value isKindOfClass:[NSNull class]]) return YES;
-    
-    return NO;
-}
-
-@implementation JSONValueTransformer
-
--(id)init
-{
-    self = [super init];
-    if (self) {
-        _primitivesNames = @{@"f":@"float", @"i":@"int", @"d":@"double", @"l":@"long", @"c":@"BOOL", @"s":@"short", @"q":@"long",
-                             //and some famous aliases of primitive types
-                             // BOOL is now "B" on iOS __LP64 builds
-                             @"I":@"NSInteger", @"Q":@"NSUInteger", @"B":@"BOOL",
-                             
-                             @"@?":@"Block"};
-    }
-    return self;
-}
-
-+(Class)classByResolvingClusterClasses:(Class)sourceClass
-{
-    //check for all variations of strings
-    if ([sourceClass isSubclassOfClass:[NSString class]]) {
-        return [NSString class];
-    }
-    
-    //check for all variations of numbers
-    if ([sourceClass isSubclassOfClass:[NSNumber class]]) {
-        return [NSNumber class];
-    }
-
-    //check for all variations of dictionaries
-    if ([sourceClass isSubclassOfClass:[NSArray class]]) {
-        return [NSArray class];
-    }
-    
-    //check for all variations of arrays
-    if ([sourceClass isSubclassOfClass:[NSDictionary class]]) {
-        return [NSDictionary class];
-    }
-
-    //check for all variations of dates
-    if ([sourceClass isSubclassOfClass:[NSDate class]]) {
-        return [NSDate class];
-    }
-
-    //no cluster parent class found
-    return sourceClass;
-}
-
-#pragma mark - NSMutableString <-> NSString
--(NSMutableString*)NSMutableStringFromNSString:(NSString*)string
-{
-    return [NSMutableString stringWithString:string];
-}
-
-#pragma mark - NSMutableArray <-> NSArray
--(NSMutableArray*)NSMutableArrayFromNSArray:(NSArray*)array
-{
-    if ([array isKindOfClass:[JSONModelArray class]]) {
-        //it's a jsonmodelarray already, just return it
-        return (id)array;
-    }
-    
-    return [NSMutableArray arrayWithArray:array];
-}
-
-#pragma mark - NS(Mutable)Array <- JSONModelArray
--(NSArray*)NSArrayFromJSONModelArray:(JSONModelArray*)array
-{
-    return (NSMutableArray*)array;
-}
-
--(NSMutableArray*)NSMutableArrayFromJSONModelArray:(JSONModelArray*)array
-{
-    return (NSMutableArray*)array;
-}
-
-
-#pragma mark - NSMutableDictionary <-> NSDictionary
--(NSMutableDictionary*)NSMutableDictionaryFromNSDictionary:(NSDictionary*)dict
-{
-    return [NSMutableDictionary dictionaryWithDictionary:dict];
-}
-
-#pragma mark - NSSet <-> NSArray
--(NSSet*)NSSetFromNSArray:(NSArray*)array
-{
-    return [NSSet setWithArray:array];
-}
-
--(NSMutableSet*)NSMutableSetFromNSArray:(NSArray*)array
-{
-    return [NSMutableSet setWithArray:array];
-}
-
--(id)JSONObjectFromNSSet:(NSSet*)set
-{
-    return [set allObjects];
-}
-
--(id)JSONObjectFromNSMutableSet:(NSMutableSet*)set
-{
-    return [set allObjects];
-}
-
-//
-// 0 converts to NO, everything else converts to YES
-//
-
-#pragma mark - BOOL <-> number/string
--(NSNumber*)BOOLFromNSNumber:(NSNumber*)number
-{
-    if (isNull(number)) return [NSNumber numberWithBool:NO];
-    return [NSNumber numberWithBool: number.intValue==0?NO:YES];
-}
-
--(NSNumber*)BOOLFromNSString:(NSString*)string
-{
-    if (string != nil && 
-        ([string caseInsensitiveCompare:@"true"] == NSOrderedSame ||
-        [string caseInsensitiveCompare:@"yes"] == NSOrderedSame)) {
-        return [NSNumber numberWithBool:YES];
-    }
-    return [NSNumber numberWithBool: ([string intValue]==0)?NO:YES];
-}
-
--(NSNumber*)JSONObjectFromBOOL:(NSNumber*)number
-{
-    return [NSNumber numberWithBool: number.intValue==0?NO:YES];
-}
-
-#pragma mark - string/number <-> float
--(float)floatFromObject:(id)obj
-{
-    return [obj floatValue];
-}
-
--(float)floatFromNSString:(NSString*)string
-{
-    return [self floatFromObject:string];
-}
-
--(float)floatFromNSNumber:(NSNumber*)number
-{
-    return [self floatFromObject:number];
-}
-
--(NSNumber*)NSNumberFromfloat:(float)f
-{
-    return [NSNumber numberWithFloat:f];
-}
-
-#pragma mark - string <-> number
--(NSNumber*)NSNumberFromNSString:(NSString*)string
-{
-    return [NSNumber numberWithDouble:[string doubleValue]];
-}
-
--(NSString*)NSStringFromNSNumber:(NSNumber*)number
-{
-    return [number stringValue];
-}
-
--(NSDecimalNumber*)NSDecimalNumberFromNSString:(NSString*)string
-{
-    return [NSDecimalNumber decimalNumberWithString:string];
-}
-
--(NSString*)NSStringFromNSDecimalNumber:(NSDecimalNumber*)number
-{
-    return [number stringValue];
-}
-
-#pragma mark - string <-> url
--(NSURL*)NSURLFromNSString:(NSString*)string
-{
-    // do not change this behavior - there are other ways of overriding it
-    // see: https://github.com/icanzilb/JSONModel/pull/119
-    return [NSURL URLWithString:string];
-}
-
--(NSString*)JSONObjectFromNSURL:(NSURL*)url
-{
-    return [url absoluteString];
-}
-
-#pragma mark - string <-> date
--(NSDateFormatter*)importDateFormatter
-{
-    static dispatch_once_t onceInput;
-    static NSDateFormatter* inputDateFormatter;
-    dispatch_once(&onceInput, ^{
-        inputDateFormatter = [[NSDateFormatter alloc] init];
-        [inputDateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]];
-        [inputDateFormatter setDateFormat:@"yyyy-MM-dd'T'HHmmssZZZ"];
-    });
-    return inputDateFormatter;
-}
-
--(NSDate*)__NSDateFromNSString:(NSString*)string
-{
-    string = [string stringByReplacingOccurrencesOfString:@":" withString:@""]; // this is such an ugly code, is this the only way?
-    return [self.importDateFormatter dateFromString: string];
-}
-
--(NSString*)__JSONObjectFromNSDate:(NSDate*)date
-{
-    static dispatch_once_t onceOutput;
-	static NSDateFormatter *outputDateFormatter;
-    dispatch_once(&onceOutput, ^{
-        outputDateFormatter = [[NSDateFormatter alloc] init];
-        [outputDateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]];
-        [outputDateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZZ"];
-    });
-    return [outputDateFormatter stringFromDate:date];
-}
-
-#pragma mark - number <-> date
-- (NSDate*)NSDateFromNSNumber:(NSNumber*)number
-{
-    return [NSDate dateWithTimeIntervalSince1970:number.doubleValue];
-}
-
-#pragma mark - string <-> NSTimeZone
-
-- (NSTimeZone *)NSTimeZoneFromNSString:(NSString *)string {
-    return [NSTimeZone timeZoneWithName:string];
-}
-
-- (id)JSONObjectFromNSTimeZone:(NSTimeZone *)timeZone {
-    return [timeZone name];
-}
-
-#pragma mark - hidden transform for empty dictionaries
-//https://github.com/icanzilb/JSONModel/issues/163
--(NSDictionary*)__NSDictionaryFromNSArray:(NSArray*)array
-{
-    if (array.count==0) return @{};
-    return (id)array;
-}
-
--(NSMutableDictionary*)__NSMutableDictionaryFromNSArray:(NSArray*)array
-{
-    if (array.count==0) return [[self __NSDictionaryFromNSArray:array] mutableCopy];
-    return (id)array;
-}
-
-@end

+ 0 - 34
Benchmark/Vendor/MJExtension/MJDictionaryCache.h

@@ -1,34 +0,0 @@
-//
-//  MJDictionaryCache.h
-//  MJExtensionExample
-//
-//  Created by MJ Lee on 15/8/22.
-//  Copyright (c) 2015年 小码哥. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@interface MJDictionaryCache : NSObject
-/**
- *  缓存数据
- *
- *  @param dictId 字典标识
- *
- *  @return 缓存的字典
- */
-+ (id)setObject:(id)object forKey:(id<NSCopying>)key forDictId:(const void *)dictId;
-
-/**
- *  获得缓存的数据
- *
- *  @param dictId 字典标识
- */
-+ (id)objectForKey:(id<NSCopying>)key forDictId:(const void *)dictId;
-
-/**
- *  获得缓存的字典
- *
- *  @param dictId 字典标识
- */
-+ (id)dictWithDictId:(const void *)dictId;
-@end

+ 0 - 37
Benchmark/Vendor/MJExtension/MJDictionaryCache.m

@@ -1,37 +0,0 @@
-//
-//  MJDictionaryCache.m
-//  MJExtensionExample
-//
-//  Created by MJ Lee on 15/8/22.
-//  Copyright (c) 2015年 小码哥. All rights reserved.
-//
-
-#import "MJDictionaryCache.h"
-#import <objc/runtime.h>
-
-@implementation MJDictionaryCache
-+ (id)setObject:(id)object forKey:(id<NSCopying>)key forDictId:(const void *)dictId
-{
-    // 获得字典
-    NSMutableDictionary *dict = [self dictWithDictId:dictId];
-    if (dict == nil) {
-        dict = [NSMutableDictionary dictionary];
-        objc_setAssociatedObject(self, dictId, dict, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-    }
-    
-    // 存储数据
-    dict[key] = object;
-    
-    return dict;
-}
-
-+ (id)objectForKey:(id<NSCopying>)key forDictId:(const void *)dictId
-{
-    return [self dictWithDictId:dictId][key];
-}
-
-+ (id)dictWithDictId:(const void *)dictId
-{
-    return objc_getAssociatedObject(self, dictId);
-}
-@end

+ 0 - 15
Benchmark/Vendor/MJExtension/MJExtension.h

@@ -1,15 +0,0 @@
-//
-//  MJExtension.h
-//  MJExtension
-//
-//  Created by mj on 14-1-15.
-//  Copyright (c) 2014年 小码哥. All rights reserved.
-//  代码地址:https://github.com/CoderMJLee/MJExtension
-//  代码地址:http://code4app.com/ios/%E5%AD%97%E5%85%B8-JSON-%E4%B8%8E%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%BD%AC%E6%8D%A2/5339992a933bf062608b4c57
-
-#import "NSObject+MJCoding.h"
-#import "NSObject+MJProperty.h"
-#import "NSObject+MJClass.h"
-#import "NSObject+MJKeyValue.h"
-#import "NSString+MJExtension.h"
-#import "MJExtensionConst.h"

+ 0 - 88
Benchmark/Vendor/MJExtension/MJExtensionConst.h

@@ -1,88 +0,0 @@
-
-#ifndef __MJExtensionConst__H__
-#define __MJExtensionConst__H__
-
-#import <Foundation/Foundation.h>
-
-// 过期
-#define MJExtensionDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead)
-
-// 构建错误
-#define MJExtensionBuildError(clazz, msg) \
-NSError *error = [NSError errorWithDomain:msg code:250 userInfo:nil]; \
-[clazz setMj_error:error];
-
-// 日志输出
-#ifdef DEBUG
-#define MJExtensionLog(...) NSLog(__VA_ARGS__)
-#else
-#define MJExtensionLog(...)
-#endif
-
-/**
- * 断言
- * @param condition   条件
- * @param returnValue 返回值
- */
-#define MJExtensionAssertError(condition, returnValue, clazz, msg) \
-[clazz setMj_error:nil]; \
-if ((condition) == NO) { \
-    MJExtensionBuildError(clazz, msg); \
-    return returnValue;\
-}
-
-#define MJExtensionAssert2(condition, returnValue) \
-if ((condition) == NO) return returnValue;
-
-/**
- * 断言
- * @param condition   条件
- */
-#define MJExtensionAssert(condition) MJExtensionAssert2(condition, )
-
-/**
- * 断言
- * @param param         参数
- * @param returnValue   返回值
- */
-#define MJExtensionAssertParamNotNil2(param, returnValue) \
-MJExtensionAssert2((param) != nil, returnValue)
-
-/**
- * 断言
- * @param param   参数
- */
-#define MJExtensionAssertParamNotNil(param) MJExtensionAssertParamNotNil2(param, )
-
-/**
- * 打印所有的属性
- */
-#define MJLogAllIvars \
--(NSString *)description \
-{ \
-    return [self mj_keyValues].description; \
-}
-#define MJExtensionLogAllProperties MJLogAllIvars
-
-/**
- *  类型(属性类型)
- */
-extern NSString *const MJPropertyTypeInt;
-extern NSString *const MJPropertyTypeShort;
-extern NSString *const MJPropertyTypeFloat;
-extern NSString *const MJPropertyTypeDouble;
-extern NSString *const MJPropertyTypeLong;
-extern NSString *const MJPropertyTypeLongLong;
-extern NSString *const MJPropertyTypeChar;
-extern NSString *const MJPropertyTypeBOOL1;
-extern NSString *const MJPropertyTypeBOOL2;
-extern NSString *const MJPropertyTypePointer;
-
-extern NSString *const MJPropertyTypeIvar;
-extern NSString *const MJPropertyTypeMethod;
-extern NSString *const MJPropertyTypeBlock;
-extern NSString *const MJPropertyTypeClass;
-extern NSString *const MJPropertyTypeSEL;
-extern NSString *const MJPropertyTypeId;
-
-#endif

+ 0 - 27
Benchmark/Vendor/MJExtension/MJExtensionConst.m

@@ -1,27 +0,0 @@
-#ifndef __MJExtensionConst__M__
-#define __MJExtensionConst__M__
-
-#import <Foundation/Foundation.h>
-
-/**
- *  成员变量类型(属性类型)
- */
-NSString *const MJPropertyTypeInt = @"i";
-NSString *const MJPropertyTypeShort = @"s";
-NSString *const MJPropertyTypeFloat = @"f";
-NSString *const MJPropertyTypeDouble = @"d";
-NSString *const MJPropertyTypeLong = @"l";
-NSString *const MJPropertyTypeLongLong = @"q";
-NSString *const MJPropertyTypeChar = @"c";
-NSString *const MJPropertyTypeBOOL1 = @"c";
-NSString *const MJPropertyTypeBOOL2 = @"b";
-NSString *const MJPropertyTypePointer = @"*";
-
-NSString *const MJPropertyTypeIvar = @"^{objc_ivar=}";
-NSString *const MJPropertyTypeMethod = @"^{objc_method=}";
-NSString *const MJPropertyTypeBlock = @"@?";
-NSString *const MJPropertyTypeClass = @"#";
-NSString *const MJPropertyTypeSEL = @":";
-NSString *const MJPropertyTypeId = @"@";
-
-#endif

部分文件因为文件数量过多而无法显示