Example with basic types
January 10, 2012 · View on GitHub
hash: string: some text number: 12345 array_of_bool: [on, off, true, false, yes, no] ruby symbol: :symbol array: - item one - item two --> { "hash" => { "number" => 12345, "array_of_bool" => [ [0] true, [1] false, [2] true, [3] false, [4] true, [5] false ], "array" => [ [0] "item one", [1] "item two" ], "string" => "some text", "ruby symbol" => :symbol } }
Example with array of hash :
- key: sub_key: value --> [ [0] { "sub_key" => "value", "key" => nil } ]
Example with array of hash of hash (nb: double indent) :
- key: sub_key: value --> [ [0] { "key" => { "sub_key" => "value" } } ]