title: Convert yaml to json without struct
body: <pre><code>Services: 
  -   Orders: 
      -   ID: $save ID1
          SupplierOrderCode: $SupplierOrderCode
      -   ID: $save ID2
          SupplierOrderCode: 111111
  </code></pre>
  
  <p>I want to convert this yaml string to json, cause the source data is dynamic, so I can't map it to a struct:</p>
  
  <pre><code>var body interface{}
  err := yaml.Unmarshal([]byte(s), &amp;body)
  </code></pre>
  
  <p>Then I want to convert that interface to json string again:</p>
  
  <pre><code>b, _ := json.Marshal(body)
  </code></pre>
  
  <p>But an error occur:</p>
  
  <pre><code>panic: json: unsupported type: map[interface {}]interface {}
  </code></pre>