How to use JSON to serialize something in Ruby, save it to a file and read it back
This is mostly based on code samples from Stack Overflow which I didn't do a very good job of keeping track of the links.
All this has been tested on Jruby 1.7.16.1 which is compatible with Ruby 1.9.3 and can be tested in jirb
Serialize …