/csv-to-json

Converting a CSV File into a JSON file

Primary LanguagePython

csv-to-json

Converting a CSV File into a JSON file

Here is the email with the round 2 task that I've put together for you. I wish you all the best!

Write a script that takes an input CSV file and outputs a JSON file. The goal of the script is to parse and validate the data in the CSV file correctly and to output the resulting value in a JSON file that contains all the rows from the CSV file properly validated and type casted.

Assume that each cell in the CSV can be one of the following types that need to be typecasted and validated: Integer Decimal String Date Time Boolean Null A sample CSV input file is attached below for reference, which you can use for testing the script with.

Instructions Make your changes and push your code regularly to this repo, so that we can look at it and give you any feedback whenever we can Update the README file with instructions on what the script does and how to use it. Use Python3 to write the script Use the standard csv module in Python For CSV validation, you are allowed to use the Python Voluptuous validation library Evaluation Readable code with proper documentation/comments Edge-case coverage Efficiency (should be faster for large files with 1000s of rows) Descriptive commit messages