weave together nested ruby objects into a json document with ease