require 'json' x = {first_name: "Napoleon", age: 51}puts JSON.pretty_generate(x)
Standard input is empty
{ "first_name": "Napoleon", "age": 51 }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!