Fixing json output

OpenStruct implement to_h , not to_hash