Converting json file in csv

Hello,



I tried to scrape json file in python,



r = requests.get(url, headers = headers).json()



Help required to convert the json data in json file and / or csv file.



Thanks

You can work with beautiful soup python package. I found it easy to use. An example of it is covered in the below blog.



https://blog.quantinsti.com/quantitative-value-investing-strategy-python/



Beautiful soup documentation:  https://www.crummy.com/software/BeautifulSoup/bs4/doc/