Settings

Theme

Using Mapper to Parse JSON in Swift

eng.lyft.com

19 points by SmileyKeith 10 years ago · 4 comments

Reader

codingvelocity 10 years ago

Why would someone use mapper over SwiftyJSON?

  • SmileyKeithOP 10 years ago

    One really nice benefit is that you don't have to duplicate any type information. Once you define your model with the data types you expect, mapper infers those types and converts the JSON values accordingly. It seems like with SwiftyJSON (which I haven't used) you have to duplicate this by calling things like `.stringValue` etc.

    • codingvelocity 10 years ago

      Interesting, i'll have to give it a shot to see how it works. Any plans to provide integrations for something like alamofire? If I could abstract all of the work to a special response handler i'd definitely switch over

yilugit 10 years ago

really nice!!!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection