I think using `marshal_dump` here is a bit of a smell.  That's an implementation detail of `OpenStruct`.  I think you'd be better using `as_json` here.