title: dump() missing 1 required positional argument: 'fp' in python json
body: <p>I am trying to prettify the json format but i am getting this error:</p>
  
  <pre><code>import requests as tt
  from bs4 import BeautifulSoup
  import json
  
  get_url=tt.get("https://in.pinterest.com/search/pins/?rs=ac&amp;len=2&amp;q=batman%20motivation&amp;eq=batman%20moti&amp;etslf=5839&amp;term_meta[]=batman%7Cautocomplete%7Cundefined&amp;term_meta[]=motivation%7Cautocomplete%7Cundefined")
  soup=BeautifulSoup(get_url.text,"html.parser")
  
  select_css=soup.select("script#jsInit1")[0]
  for i in select_css:
      print(json.dump(json.loads(i),indent=4,sort_keys=True))
  </code></pre>
  
  <p>Basically i want to extract this type of element :</p>
  
  <pre><code>'orig': {'width': 1080, 'url': '', 'height': 1349},
  </code></pre>
  
  <p>I know i can do this with </p>
  
  <pre><code>select_css.get('orig').get('url')
  </code></pre>
  
  <p>But i am not sure is this json element is nested element under any element ? That's why i am trying to prettify to get idea.</p>