Skip to content

Instantly share code, notes, and snippets.

@schacon
Created September 10, 2009 22:41
Show Gist options
  • Save schacon/184888 to your computer and use it in GitHub Desktop.
Save schacon/184888 to your computer and use it in GitHub Desktop.
>> {:type => ['value1', 'value2']}.to_json
=> "{\"type\":[\"value1\",\"value2\"]}"
>> {:type => ['value1', 'value2']}.to_yaml
=> "--- \n:type: \n- value1\n- value2\n"
>> {:type => ['value1', 'value2']}.to_xml
RuntimeError: Not all elements respond to to_xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment