Functions performed on a JSON to help with validation testing
Scenario - 1
Write a function to read a JSON file and return number of files belongs to each status
Scenario - 2
Using above solution return document details based on passed status argument
Scenario - 3
Write a function to return document details based on file name passed as argument
Scenario - 4
Flatten a tree (JSON) and convert it into a dictionary
import json
3 or above
PyCharm community edition
- Download the project from Git repo
- Launch PyCharm
- Open the project and file in IDE
- Right click on the file
- Tap on run
OR
- Open the Terminal at the bottom
- Make sure you are in the project dictonary
- Enter command python <file.py>
- Navigate to project folder cd
- Enter command python <file.py>
- Navigate to file and comment func call
- add print(json.loads(<func_name>), intend =2))
- Run the file