Created
November 13, 2018 05:15
-
-
Save nikita8/e463e20b041a374af86ef2fadb872a09 to your computer and use it in GitHub Desktop.
JSON encoding in Ruby
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
#Ruby | |
hash = {apple: 5, lettuce: 7} | |
#encoding hash to json | |
json_data = hash.to_json | |
puts json_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment