title: Adding json value in yml in python changing the format to yml again
body: <p>I have to fetch json data and paste it in one of the values in yml. But it is converting it to yml format.</p>
  <pre><code>{
    &quot;meta&quot;: {
      &quot;type&quot;: &quot;db&quot;,
      &quot;slug&quot;: &quot;test&quot;,
      &quot;expires&quot;: &quot;0001-01-01T00:00:00Z&quot;,
      &quot;created&quot;: &quot;2016-05-11T22:00:29Z&quot;,
      &quot;updated&quot;: &quot;2021-11-29T23:36:37Z&quot;,
      &quot;createdBy&quot;: &quot;Anonymous&quot;
    }
  }
  
  </code></pre>
  <pre><code>apiVersion: integreatly.org/v1alpha1
  kind: GrafanaDashboard
  metadata:
    name: testname
    labels:
      app: grafana
      type: dashboard
      folder: proj
  spec:
    json: &gt;
  </code></pre>
  <pre><code>import json
  import yaml
  
  # Load files as dicts
  with open(&quot;sample.json&quot;, &quot;r&quot;) as f:
      j = json.load(f)
  with open(&quot;sample.yaml&quot;, &quot;r&quot;) as f:
      y = yaml.load(f, Loader=yaml.BaseLoader)
  # Assign JSON &quot;Slug&quot; to YAML &quot;name&quot;.
  y['metadata']['name'] = j['meta']['slug']
  y['spec']['json'] = j
  print(y)
  
  </code></pre>
  <p>I want the output as below</p>
  <pre><code>apiVersion: integreatly.org/v1alpha1
  kind: GrafanaDashboard
  metadata:
    name: test
    labels:
      app: grafana
      type: dashboard
      folder: proj
  spec:
    json: &gt;
      &quot;meta&quot;: {
      &quot;type&quot;: &quot;db&quot;,
      &quot;slug&quot;: &quot;test&quot;,
      &quot;expires&quot;: &quot;0001-01-01T00:00:00Z&quot;,
      &quot;created&quot;: &quot;2016-05-11T22:00:29Z&quot;,
      &quot;updated&quot;: &quot;2021-11-29T23:36:37Z&quot;,
      &quot;createdBy&quot;: &quot;Anonymous&quot;
    }
  
  </code></pre>
  <p>but with the above script it is showing all the data in dictionary format format. I would like to replace the sampleyaml with the added changes.</p>
  <p>Please help me.</p>