A simple Python script to parse a JSON
file and output the results to a text file.
I wanted to parse out a GitHub API response consisting of all of my repositories. The problem is, there are too many JSON
elements to parse out manually. I needed a way to parse out specific the JSON
elements values only, automatically. So I built this!
- Clone this repository.
- Install Python.
- Install Pip.
- Place your
JSON
file in the root directory of this repository (seeexample.json
). - Adjust the script to parse out the
JSON
elements you want (seejson_parser.py
- lines 7-9 currently set to parse out the first instance of "name"). - Run the script:
python json_parser.py
- View the output in the
output.txt
file.
This project is released under the terms of The Unlicense, which allows you to use, modify, and distribute the code as you see fit.
- The Unlicense removes traditional copyright restrictions, giving you the freedom to use the code in any way you choose.
- For more details, see the LICENSE file in this repository.
Author: Scott Grivner
Email: [email protected]
Website: scottgrivner.dev
Reference: Main Branch