TSV to JSON
Convert a small tab-separated table to JSON while preserving identifiers and empty cells as strings.
Convert a small tab-separated table to JSON while preserving identifiers and empty cells as strings.
How to use
- Paste the sample with actual tabs and keep the tab after 002 to mark an empty final field.
- Run the conversion and inspect the two JSON objects under the id and note keys.
- Check the first note for its comma and the second note for an empty string.
Worked example
Input
id note
001 "Hello, world"
002 Expected result
[{"id":"001","note":"Hello, world"},{"id":"002","note":""}]Check the result
Both identifiers should retain their leading zeroes: 001 and 002.