title: how to read json object in python
body: <p>I have json file named &quot;panamaleaks50k.json&quot;. I want to get ['text'] field from the json file but it shows me following error</p>
  <blockquote>
  <p>the JSON object must be str, bytes or bytearray, not 'TextIOWrapper'</p>
  </blockquote>
  <p>this is my code</p>
  <pre><code>with open('C:/Users/bilal butt/Desktop/PanamalEakJson.json','r') as lst:
      b = json.loads(lst)
      print(b['text'])
  </code></pre>
  <p>my json file look</p>
  <pre><code>[
  {
     &quot;fullname&quot;: &quot;Mohammad Fayyaz&quot;,
     &quot;id&quot;: &quot;885800668862263296&quot;,
     &quot;likes&quot;: &quot;0&quot;,
     &quot;replies&quot;: &quot;0&quot;,
     &quot;retweets&quot;: &quot;0&quot;,
     &quot;text&quot;: &quot;Love of NS has been shown in PanamaLeaks scandal verified by JIT...&quot;,
     &quot;timestamp&quot;: &quot;2017-07-14T09:58:31&quot;,
     &quot;url&quot;: &quot;/mohammadfayyaz/status/885800668862263296&quot;,
     &quot;user&quot;: &quot;mohammadfayyaz&quot;
   },
  {
    &quot;fullname&quot;: &quot;TeamPakistanPTI \u00ae&quot;,
    &quot;id&quot;: &quot;885800910357749761&quot;,
    &quot;likes&quot;: &quot;0&quot;,
    &quot;replies&quot;: &quot;0&quot;,
    &quot;retweets&quot;: &quot;0&quot;,
    &quot;text&quot;: &quot;RT ArsalanISF: #PanamaLeaks is just a start. U won't believe whr...&quot;,
    &quot;timestamp&quot;: &quot;2017-07-14T09:59:29&quot;,
    &quot;url&quot;: &quot;/PtiTeampakistan/status/885800910357749761&quot;,
    &quot;user&quot;: &quot;PtiTeampakistan&quot;
   }
  ]
  </code></pre>
  <p>how I can read all ['text'] and just single ['text'] field?</p>