Created
September 15, 2016 23:45
-
-
Save piedoom/41985198d98c67bdfa8bc5eea0f952b2 to your computer and use it in GitHub Desktop.
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
class Blog | |
JSON.mapping({ | |
name: {type: String}, | |
likes: {type: Int32}, | |
following: {type: Int32}, | |
default_post_format: {type: String} | |
}) | |
end |
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
Blog.from_json(json_string) |
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
{ | |
"meta": { | |
"status": 200, | |
"msg": "OK" | |
}, | |
"response": { | |
"user": { | |
"name": "doomy", | |
"likes": 37358, | |
"following": 205, | |
"default_post_format": "html", | |
etc......... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment