CSV and JSON Conversion: Keep Identifiers and Quoted Fields Intact
Work through leading zeroes, embedded commas, missing values and spreadsheet formulas before sharing a converted table.
Start with a small table you can verify
Before converting a large export, take a few representative rows. Include an identifier with leading zeroes, a blank cell, a value containing a comma and a quoted sentence. Keep the original file. A conversion that produces valid JSON can still lose information if the receiving system interprets a code as a number.
In LipiCode, CSV headers become object keys and cell values remain strings. The CSV row Asha,001 under headers name,code becomes an object with name Asha and code 001. The code retains its zeroes. Confirm that the API or application receiving the JSON expects strings; convert types deliberately in that application when necessary.
Check separators and embedded quotes
Try headers name,code,notes and a row Asha,001, followed by a double-quoted notes field containing Tea, coffee. That notes field should remain one value. For a quote inside a quoted CSV field, double the quote; an embedded newline must also stay inside the quoted field. These cases are included in the converter’s browser regression checks.
Choose the separator used by the source: comma, semicolon or tab. LipiCode requires nonempty unique headers and the same number of fields in every data row. If a row fails, inspect its surrounding quotes before deleting commas or newlines. Blind replacements can change the actual data.
- Compare the record count
- Check the first and last records
- Inspect one field containing a separator
- Check a multiline field
Understand what a round trip cannot preserve
CSV does not describe a value’s type. In JSON-to-CSV output, a missing property and a null value both become an empty cell. Converting that CSV back cannot reconstruct the distinction. Nested objects and arrays are rejected by this tool; flatten them into explicitly named columns first if that suits your destination.
The converter builds columns in order of first appearance across records. A later record can introduce a new column, leaving earlier records with an empty cell. Check that the destination accepts this column order. A successful download is not evidence that every record matches your business rules.
Treat spreadsheet formulas separately
When exporting untrusted strings to a spreadsheet, keep formula protection enabled. LipiCode prefixes formula-like strings with an apostrophe, including values beginning with =, +, - or @ after leading whitespace. Numeric values remain numeric. The prefix changes the text; it is not a universal guarantee across spreadsheet applications.
For an example, a JSON string equal to =1+1 receives a protective prefix, while a numeric score of -2 remains a number. Open the CSV in the intended spreadsheet application and inspect those cells. For machine-to-machine use, decide whether that prefix belongs in your data rather than leaving the setting unexplained.
References and further reading
These primary or authoritative references support standards-dependent details. The examples explain how these details apply to the workflow on this site.