def client_objects_to_h(value)
      case value.class.to_s
      when /^MmJsonClient/
        client_objects_to_h(value.to_h)
      when 'Hash'
        Hash[value.map { |k, v| [k, client_objects_to_h(v)] }]
      when 'Array'
        value.map { |v| client_objects_to_h(v) }
      else
        value
      end
    end
def client_objects_to_h(value)
      case value.class.to_s
      when /^MmJsonClient/
        client_objects_to_h(value.to_h)
      when 'Hash'
        Hash[value.map { |k, v| [k, client_objects_to_h(v)] }]
      when 'Array'
        value.map { |v| client_objects_to_h(v) }
      else
        value
      end
    end
Recusively converts found MmJsonClient objects to hashes.