CocoaPods trunk is moving to be read-only. Read more on the blog, there are 3 months to go.

Mapper 0.3.2

Mapper 0.3.2

TestsTested ✓
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Mar 2015
SPMSupports SPM ✗

Maintained by Christoffer Winterkvist.



Mapper 0.3.2

Object mapping made easy

Filling an NSObject with values is as easy as pie.

class Person {
    var name: String = ""
    var age: Int = 0
}

let subject = Person.new()
subject.fill(["name":"Batman", "age":55])

Like that wasn't easy enough, Mapper also adds a method to initialise objects using a dictionary.

let subject = Person.initWithDictionary(["name":"Batman", "age":55])

Mapper can also serve up a dictionary representation of any object that you throw at it.

let objectDictionary: NSDictionary = subject.dictionaryRepresentation()

Contribute

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create pull request