Convert CSV file to JSON format

  • Versão de lançamento: Australia
  • Atualizado 12 de mar. de 2026
  • 1 min. de leitura
  • Convert your CSV file to JSON format to create synthetic monitors.

    CSV file to JSON format

    To convert the CSV file to JSON format, access the terminal. Depending on your operating system, execute the required commands.
    Tabela 1. Commands to convert CSV file to JSON format
    Operating system Curl commands
    macOS jq -Rs ‘{csv_content: .}’ filename.csv
    Windows Powershell
    • If using jq, use the command jq -Rs ‘{csv_content: .}’ filename.csv
    • If using only Powershell (no jq installed), use the commands:
      1. $csvContent = Get-Content -Path "synthetic_checks.csv" -Raw
      2. $json = @{ csv_content = $csvContent } | ConvertTo-Json
      3. $json
    • If using Windows command prompt with jq installed, use the command jq -Rs "{csv_content: .}" filename.csv

    The output is a CSV content wrapped in JSON format that is available on the terminal. { "csv_content": "name,method,description,interval,cmdb_ci,...\n\"Monitors1\",\"GET\",\"CHECK1\",5,..." }

    Once the content is available in JSON format, access the Body tab in Postman, and select Raw to paste the JSON format content and select Send.
    Nota:
    Ensure that the format selected is JSON.

    The response status provides the job Id and the status of monitors created. If there are any errors found, fix the file and run the same commands to complete the monitor creation.