Shapes of data — JSON, CSV, documents
What you will learn Structured versus unstructured data, how to read JSON and CSV, why PDFs and Hangul documents cost extra work, and why text turns to garbage.
Structured or not
| Structured | Unstructured | |
|---|---|---|
| Shape | tables, fields and values | prose, images |
| Examples | databases, CSV, JSON | reports, email, meeting notes, PDFs |
| A machine can | compute directly | only read and interpret |
| How much a company has | little | most of it |
The bottom row is why AI is worth something inside a company. Existing systems only ever handled the structured part, and most corporate material is prose. Language models work on prose.
JSON — how programs exchange things
The block of text from the exercise. Three rules.
| Symbol | Meaning |
|---|---|
{ } | a group of "name: value" pairs |
[ ] | a list, in order |
"…" | text. Numbers and true/false take no quotes |
It nests. Above, the value of manager is another { }. Shapes a table
cannot hold fit here.
If it is hard to read, ask an agent to "turn this JSON into a table". Faster than counting brackets.
CSV — a table as text
It looks like a spreadsheet file. It is not.
| CSV | Excel (.xlsx) | |
|---|---|---|
| Contents | text only | formatting, formulas, several sheets |
| File | text — readable as is | binary — needs opening |
| Exchange | any program | the spreadsheet family |
CSV is the easier hand-off to an AI. Values containing a comma must be
quoted ("Seoul, Gangnam"), and saving from a spreadsheet as CSV drops the
formulas and keeps only the results.
Markdown — what this manual is written in
Text where a few symbols carry the formatting: **bold**, # heading.
AI output is usually Markdown because it is text you can manipulate directly while keeping heading, list and table structure. Convert it to HWPX or PDF later if you need to (Working with Korean official documents).
Why PDFs and Hangul documents cost more
A PDF is a format for printing. It records "this glyph at this coordinate at this size", and often carries no structure for tables or paragraphs at all.
graph TD
A["PDF · HWP · scanned image"] --> B["pull the characters out<br/>extraction · OCR"]
B --> C["text · Markdown"]
C --> D["the AI reads it"]| Source | Difficulty |
|---|---|
| PDF generated from text | easy — the characters are in there |
| Scanned PDF, photo | hard — needs OCR (reading text from an image) |
| Table-heavy documents | hard — the cell structure collapses easily |
Most of "the AI cannot read our documents" is this step. The model is not being dense; the characters were never there.
Why text turns to garbage — encoding
Encoding is the agreement for turning characters into numbers. Save with one agreement and read with another and you get garbage.
The classic symptom:
If a CSV opens with broken Korean in a spreadsheet, the file is UTF-8 and the spreadsheet read it as CP949. The file is not damaged.
Choosing what to exchange
Common misconceptions
"Can't I just upload the spreadsheet?"
You can. A conversion to text happens inside, and formatting, formulas and merged cells are lost along the way. If the result looks wrong, suspect that step.
"Isn't PDF the standard?"
For exchanging and printing, yes. For processing again, it is close to the worst choice. If the original (spreadsheet, document, Markdown) exists, send that.
Check yourself
1. The main difference between CSV and a spreadsheet file?
Answer
CSV is text, a spreadsheet file is binary. CSV reads as is but carries no formatting, formulas or multiple sheets.
2. Why is a scanned PDF harder than a text PDF?
Answer
The characters are an image. OCR has to read them out of the picture first.
3. Text arrives as garbage characters — what do you suspect?
Answer
Encoding. The agreement used to save and the one used to read disagree — UTF-8 read as CP949, for instance.
Next, where structured data actually lives → What a database is