JSON과 CSV 오가기
핵심 포인트
- 형식
- 변환
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".
Checking that the JSON syntax is correct before converting prevents conversion errors.
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
알맞은 경우
- 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.
예
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.
요약
Use JSON formatting and checking in combination with conversion to CSV.
“JSON 정리 및 검증” 사용하기 (무료)함께 쓰면 좋은 도구
- CSV와 JSON 변환: CSV와 JSON을 즉시 서로 변환합니다.
- 파일과 Base64 변환: 파일과 Base64 텍스트를 서로 변환합니다.
- 중복된 줄 제거 및 목록 정렬: 중복된 줄을 제거하고 정렬합니다.