Skip to content

Instantly share code, notes, and snippets.

@DQNEO
Forked from anonymous/output.json
Last active August 29, 2015 14:02
Show Gist options
  • Save DQNEO/f81f21b8787d4d6c8f02 to your computer and use it in GitHub Desktop.
Save DQNEO/f81f21b8787d4d6c8f02 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'json'
data = {
:net => {
:hostname => "dqneo.example.com"
},
:users => [
{ :name => 'dqneo', :password => 'himitsu' },
],
:tz => "Asia/Tokyo",
}
puts JSON.pretty_generate(data);
=begin
{
"net": {
"hostname": "dqneo.example.com"
},
"users": [
{
"name": "dqneo",
"password": "himitsu"
}
],
"tz": "Asia/Tokyo"
}
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment