title: How to convert JSON (or POJO) to Room Entity?
body: <p>Having simple JSON, <a href="https://json.org/example.html" rel="nofollow noreferrer">for instance</a>:</p>
  <pre><code>{
      &quot;widget&quot;: {
          &quot;debug&quot;: &quot;on&quot;,
          &quot;window&quot;: {
              &quot;title&quot;: &quot;Sample Konfabulator Widget&quot;,
              &quot;name&quot;: &quot;main_window&quot;,
              &quot;width&quot;: 500,
              &quot;height&quot;: 500
          },
          &quot;image&quot;: { 
              &quot;src&quot;: &quot;Images/Sun.png&quot;,
              &quot;name&quot;: &quot;sun1&quot;,
              &quot;hOffset&quot;: 250,
              &quot;vOffset&quot;: 250,
              &quot;alignment&quot;: &quot;center&quot;
          },
          &quot;text&quot;: {
              &quot;data&quot;: &quot;Click Here&quot;,
              &quot;size&quot;: 36,
              &quot;style&quot;: &quot;bold&quot;,
              &quot;name&quot;: &quot;text1&quot;,
              &quot;hOffset&quot;: 250,
              &quot;vOffset&quot;: 100,
              &quot;alignment&quot;: &quot;center&quot;,
              &quot;onMouseUp&quot;: &quot;sun1.opacity = (sun1.opacity / 100) * 90;&quot;
          }
      }
  }
  </code></pre>
  <p>we can convert it to <code>POJO</code> using <a href="http://www.jsonschema2pojo.org/" rel="nofollow noreferrer">sites</a> or <a href="https://plugins.jetbrains.com/plugin/9960-json-to-kotlin-class-jsontokotlinclass-" rel="nofollow noreferrer">plugins</a> in <code>Android Studio</code>. But how to convert it to <code>Room</code> <code>Entities</code>?</p>