Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Dykan authored Mar 15, 2017
1 parent 25dfdf5 commit 0182b76
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ A microframework that helps to use [Swifty JSON](https://github.com/SwiftyJSON/S
[![Build Status](https://travis-ci.org/alickbass/SwiftyJSONModel.svg?branch=master)](https://travis-ci.org/alickbass/SwiftyJSONModel)
[![codecov](https://codecov.io/gh/alickbass/SwiftyJSONModel/branch/master/graph/badge.svg)](https://codecov.io/gh/alickbass/SwiftyJSONModel)

##Motivation:
## Motivation:

###The full motivation and description is [here](https://medium.com/@alickdikan/type-safe-json-in-swift-with-swiftyjsonmodel-89d432a8c1ee#.d07xuncxy)
### The full motivation and description is [here](https://medium.com/@alickdikan/type-safe-json-in-swift-with-swiftyjsonmodel-89d432a8c1ee#.d07xuncxy)

For the following `JSON`:

Expand Down Expand Up @@ -89,15 +89,15 @@ extension Person: JSONObjectInitializable {
}
```

##What we improved:
## What we improved:
* Keys are now restricted to the `PropertyKey` enum and we will have a compile error if we try to use something different.
* Autocomplition will help us navigate through available keys
* The constructor now `throws` which means that the init will fail if some value or it's type was different from what we expected and the `Error` will tell us exactly which property in `JSON` was wrong
* The type of the value for key is now inferred from the property we specify. That means we do not need to have all this boilerplate code with casting to `String` or `Int`. It will be done for us.

#Integration

##CocoaPods (iOS 8+)
## CocoaPods (iOS 8+)

You can use CocoaPods to install SwiftyJSONModel by adding it to your Podfile:

Expand All @@ -112,7 +112,7 @@ end

Note that this requires CocoaPods version 36, and your iOS deployment target to be at least 8.0:

##Carthage (iOS 8+)
## Carthage (iOS 8+)

You can use Carthage to install SwiftyJSONModel by adding it to your Cartfile:

Expand Down

0 comments on commit 0182b76

Please sign in to comment.