title: error using json_normalize on opened file
body: <p>Why can I use the json_normalize function in a list written directly in the script but I can't do it with the same data as an opened file?</p>
  <p>Json sample:</p>
  <pre><code>resp = {&quot;pagina&quot;: 1, &quot;total_de_paginas&quot;: 3, &quot;registros&quot;: 500, &quot;total_de_registros&quot;: 1052, &quot;produto_servico_cadastro&quot;:
  [{&quot;aliquota_cofins&quot;:0,
    &quot;aliquota_ibpt&quot;:0,
    &quot;aliquota_icms&quot;:0,
    &quot;aliquota_pis&quot;:0,
    &quot;altura&quot;:5,
    &quot;bloqueado&quot;:&quot;N&quot;,
    &quot;bloquear_exclusao&quot;:&quot;N&quot;,
    &quot;cest&quot;:&quot;&quot;,
    &quot;cfop&quot;:&quot;&quot;,
    &quot;codInt_familia&quot;:&quot;&quot;,
    &quot;codigo&quot;:&quot;10&quot;,
    &quot;codigo_beneficio&quot;:&quot;&quot;,
    &quot;codigo_familia&quot;:3250197559,
    &quot;codigo_produto&quot;:3250200206,
    &quot;codigo_produto_integracao&quot;:&quot;8531613751&quot;,
    &quot;componentes_kit&quot;:[
       {
          &quot;codigo_componente&quot;:3323761053,
          &quot;codigo_produto_componente&quot;:3250202406,
          &quot;local_estoque_componente&quot;:3244295942,
          &quot;quantidade_componente&quot;:1,
          &quot;valor_unitario_componente&quot;:13.1
       },
       {
          &quot;codigo_componente&quot;:3253472053,
          &quot;codigo_produto_componente&quot;:3250202411,
          &quot;local_estoque_componente&quot;:3244295942,
          &quot;quantidade_componente&quot;:1,
          &quot;valor_unitario_componente&quot;:13.1
       }]}]}
  </code></pre>
  <p>script 1:</p>
  <pre><code>df_= resp['produto_servico_cadastro']
  df_1 = pd.json_normalize(df_, record_path = ['componentes_kit'])
  </code></pre>
  <p>script 2:</p>
  <p>In this example, I copied the contents of the resp variable and created a json file</p>
  <pre><code>f = open('/content/data.json')
  dft = json.load(f)['produto_servico_cadastro']
  dft_1 = pd.json_normalize(dft, record_path=['componentes_kit'])
  </code></pre>
  <p>results in</p>
  <pre><code>KeyError: 'componentes_kit'
  </code></pre>