Passare da JSON a CSV e viceversa
- Formato
- Converti
JSON is convenient for programs but a table suits people totalling things. Conversely, table data needs to be JSON to be handed to a program. Here is how to combine JSON formatted with Format and Validate JSON and the CSV conversion tool.
Flow (JSON → table)
- Format the JSON with this tool and check it's correct.
- Paste the tidy JSON into "JSON → CSV" of the CSV/JSON conversion tool.
- Convert to CSV, save and open in Excel.
Flow (table → JSON)
- Copy the Excel table and convert it with "CSV → JSON" in the CSV/JSON conversion tool.
- Format the resulting JSON with this tool and check it's correct.
- If needed, compress with "Make one line".
JSON shapes that can be converted
A form where data with the same items is lined up is easy to convert to a table. Nested parts, when converted to a table, go into one cell as text.
Benefits of combining
- Conversion errors can be prevented in advance
- You can understand the data's structure through formatting before converting
- The converted JSON can be formatted at once
Adatto a
- Totalling API results in Excel
- Turning Excel data into web app data
- Managing configuration data as a table
Cautions
- What a table can handle is flat structures. Flatten deep nesting first, or extract the needed parts.
- The distinction between numbers and strings can change in conversion.
Esempio
Formatted JSON from an API with this tool to see its structure. Finding that the needed items were outside the nesting, it converted straight to CSV and could be totalled in Excel.
Common stumbling blocks
- Nested items go into one cell: reshape first.
- Date and number formats change: set the format on the Excel side.
- Garbled text: specify the encoding when opening in Excel.
Frequently asked questions
Which tool comes first?
On receiving JSON, first format and check. Then convert.
Riepilogo
Use JSON formatting and checking in combination with conversion to CSV.
Usa “Formatta e convalida JSON” (gratis)Strumenti che si abbinano bene a questo
- Converti CSV e JSON: Converti all'istante tra CSV e JSON.
- Converti file e Base64: Converti tra file e testo Base64.
- Rimuovi le righe duplicate e ordina un elenco: Rimuovi le righe duplicate e ordinale.
Se questa guida ti è stata utile, una piccola mancia sarebbe molto apprezzata.
Invia una mancia (¥300)Invia un regalo (lista desideri Amazon)