title: How to access uploaded json file google colab
body: <p>I'm stuck trying to read the files in google colab, It should read the file as a simple JSON but I can't even do a <code>json.dumps(file)</code> without getting 100 of errors</p>
  
  <p>Uploading the file:</p>
  
  <pre><code>import json 
  import csv 
  from google.colab import files
  uploaded = files.upload()
  </code></pre>
  
  <p>Printing works, It shows the content of the file:</p>
  
  <pre><code>print(uploaded)
  data = json.dumps(uploaded)
  </code></pre>
  
  <p>But I get <code>Object of type 'bytes' is not JSON serializable</code> when trying to do <code>json.dumps(uploaded)</code></p>
  
  <p>Shouldn't the file be read as <code>json</code> and not <code>bytes</code>? In some other cases, I tested it also read as <code>dictionary</code></p>
  
  <p>JSON file:</p>
  
  <pre><code>[
      {
          "type": "message",
          "subtype": "channel_join",
          "ts": "123",
          "user": "DWADAWD",
          "text": "&lt;@DWADAWD&gt; has joined the channel"
      },
      {
          "type": "message",
          "subtype": "channel_join",
          "ts": "123",
          "user": "DWADAWD",
          "text": "&lt;@DWADAWD&gt; has joined the channel"
      },
      {
          "text": "Let's chat",
          "user_profile": {
              "display_name": "XASD",
              "team": "TDF31231",
              "name": "XASD",
              "is_restricted": false,
              "is_ultra_restricted": false
          },
          "blocks": [
              {
                  "type": "rich_text",
                  "block_id": "2N1",
                  "elements": [
                      {
                          "type": "rich_text_section",
                          "elements": [
                              {
                                  "type": "text",
                                  "text": "Let's chat"
                              }
                          ]
                      }
                  ]
              }
          ]
      }
  ]
  </code></pre>