-
-
Save gfontenot/134eeaa493dab11a0e02 to your computer and use it in GitHub Desktop.
The JSON Parsing example from http://robots.thoughtbot.com/real-world-json-parsing-with-swift without operators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return bind(_JSONParse(json)) { (d: JSONObject) in | |
fmap(User.create, apply(bind(d["id"], _JSONParse), | |
apply(bind(d["name"], _JSONParse), | |
apply(pure(bind(d["email"], _JSONParse)))))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment