It seems to be pretty easy to create nested OpenStruct objects using JSON.parse:
JSON.parse( '{"a":{"b":0}}', object_class:OpenStruct )
#<OpenStruct a=#<OpenStruct b=0>>
Is there a simpler method of converting it back to json, without creating a recursive function (as demonstrated here: Deep Convert OpenStruct to JSON)?