This tool allows you to convert CSV and Excel files to JSON format required by Search Assist's structured data.
Follow these steps to use the converter:
Clone this repository to your local machine:
git clone https://github.com/rahul-kore/CSV_to_JSON.gitEnsure you have Python installed on your machine. You can download it from here.
Navigate to the project directory and install the required Python packages using pip:
pip install pandas- Place your CSV and Excel files in the
resourcesfolder within the project directory(add one if not available). Each file will be converted to JSON format.
Run the converter script by executing the following command in your terminal or command prompt:
python formater.pyFollow the prompts to enter the URL for each file (optional). Press Enter to skip if no URL is available.
URL is essentially the address to your file, especially if it's stored online and accessible to others. If your files are hosted anywhere on the internet, you can simply copy and paste the link here!
Once the conversion process is complete, you'll find the converted JSON data in the output.json file located in the resources folder.
- If a CSV file contains Excel-formatted data, the converter will automatically convert it to CSV format before converting it to JSON.
- The converted CSV file will be deleted after conversion to save space.
you can either ingest or simply upload this output.json to Search assist structured data, to make your SA app to answer from your CSVs or excel(xls and xlsx).