title: Go JSON parsing for interfaces
body: <p>I have a json which is as follows:</p>
  <pre><code>{
    &quot;parameters&quot;: {
      &quot;key1&quot;: {
          &quot;value&quot;: &quot;someStringValue&quot;
        },
      &quot;key2&quot;: {
          &quot;innerKey1&quot;: {
             &quot;innerKey2&quot;: {
               &quot;innerKey3&quot;: &quot;someStringValue&quot;
               },
            }
      }
      &quot;key4&quot;: {
          &quot;value&quot;: 123
      },
      &quot;key5&quot;: {
          &quot;value&quot;: true
      },
    }
  }
  </code></pre>
  <p>As you can see I can have different kind of values (string, map, int, bool). Following is the struct I've defined:</p>
  <pre><code>type TestStruct struct {
    Parameters map[string]ParameterValue 
  }
  
  type ParameterValue struct {
      Values map[string]interface{}
  }
  </code></pre>
  <p>With this I'm facing issues when parsing the json,<code>key1,key2,key3</code> are not being marshalled and their value is <code>nil</code>. What should be the correct struct design for this ?</p>