How do I parse JSON with Ruby on Rails? [duplicate]

These answers are a bit dated. Therefore I give you:

hash = JSON.parse string

Rails should automagically load the json module for you, so you don’t need to add require 'json'.

Leave a Comment