title: Ruby objects and JSON serialization (without Rails)
body: <p>I'm trying to understand the JSON serialization landscape in Ruby. I'm new to Ruby.</p>
  
  <p>Is there any good JSON serialization options if you are not working with Rails?</p>
  
  <p>That seems to be where this answer goes (to Rails)
  <a href="https://stackoverflow.com/questions/3226054/how-to-convert-a-ruby-object-to-json">How to convert a Ruby object to JSON</a></p>
  
  <p>The json gem seems to make it look like you have to write your own to_json method.
  I haven't been able to get to_json to work with arrays and hashes (documentation says it works with these)
  Is there a reason the json gem doesn't just reflect over the object and use a default serialization strategy? Isn't this how to_yaml works (guessing here)</p>