ruby print object as json code example Example: ruby json to object require 'json' data = JSON.parse(json_data)