Sha256: 4d7ce6d4cf283f4a4fc64a9d8c5893ea33f0a03bc0fe97f20fb577254cb54d71

Contents?: true

Size: 536 Bytes

Versions: 4

Compression:

Stored size: 536 Bytes

Contents

require 'json_builder'
j = JSONBuilder::Generator.new

j.name "Garrett Bjerkhoel"
j.birthday Time.local(1991, 9, 14)
j.street do
  j.address "1143 1st Ave"
  j.address2 "Apt 200"
  j.city "New York"
  j.state "New York"
  j.zip 10065
end
j.hashed {
  :my_name => "Garrett Bjerkhoel".split('')
}
j.skills do
  j.ruby true
  j.asp false
  j.php true
  j.mysql true
  j.mongodb true
  j.haproxy true
  j.marathon false
end
j.single_skills ['ruby', 'php', 'mysql', 'mongodb', 'haproxy']
j.booleans [true, true, false, nil]

puts j.compile!

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
json_builder-2.0.3 test/fixtures/simple.rb
json_builder-2.0.2 test/fixtures/simple.rb
json_builder-2.0.1 test/fixtures/simple.rb
json_builder-2.0.0 test/fixtures/simple.rb