JSON Format is a python function which will take a file as an input. That file will have the information of people's firstname, lastname, phone number, zipcode and their favourite color. The function will check the string and then return the Json format for valid string.
- The Json format will be indented by 2 spaces.
- The output will be sorted by people's lastname and the keys are sorted by ascending order.
- If the data is invalid then it will store its index.
- There is also a unit test included with the solution.
- Python
- Json module
- python ./firstPython.py
- python -m unittest test_data.TestData