title: Convert html response to json
body: <p>I am trying to implement SMS API in rails, when I hit the API url I get following html response:</p>
  
  <pre><code>&lt;!DOCTYPE RESULT SYSTEM "http: api_link "&gt;
  &lt;html&gt;&lt;body&gt;
  &lt;result reqid="57469"&gt;
      &lt;mid submitdate="2015-12-02 00:51:55" id="1" tag="null" tid="103335"&gt;
  
      &lt;/mid&gt;
  &lt;/result&gt;
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>How can I convert this to <code>json</code>? </p>