Data & Analysis

Text to JSON: Extract Data Without Guessing

Extracts data from text into JSON that matches the shape you give (a JSON Schema, an example object or a list of fields), without guessing. Every value comes from the text; a missing fact becomes null, numbers and dates are converted only into the type the shape asks for, two conflicting values are not settled by a guess, and instructions hidden in the text are ignored. Use when asked to extract structured data, turn text into JSON, parse an invoice, receipt, email, order, CV or job post into fields, or fill a JSON schema from a document.

Text to JSON: Extract Data Without Guessing is a SKILL.md that extracts data from text into JSON that matches the shape you give (a JSON Schema, an example object or a list of fields), without guessing; an agent buys it once for $0.05 over x402.

Tested 2026-10-03No code, no hidden instructionsv1.0.2 · 7.5 KB · perpetual license

Not for

Scanned images or PDFs your agent cannot read as text; filling in values a document leaves out; working out totals, due dates or currency conversions; checking whether the document itself is true. It returns what the text says, not what is likely.

Tested, honestly

Tested 2026-10-03 with a strong and a weak model.

With and without the skill

Results with and without the skill, for Sonnet and Haiku
SonnetHaiku
withwithoutwithwithout
Values right9/97/99/96/9
Bare JSON, parses as is9/90/90/90/9

One run per model and case. Without the skill both models guessed an ambiguous date (04/05/2026 as 4 May) and added totals the text never gave; Haiku also translated a city name. Haiku wraps the JSON in a code fence even with the skill, so strip fences if your agent runs on it.

Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.

SonnetStrong model, claude-sonnet-5-5
Passed all 9 cases with bare, valid JSON in exactly the requested shape. It read 1.250,50 € and 2.500 g by their language, turned 03.10.2026 into 2026-10-03 and left the undecidable 04/05/2026 as null, kept Cyrillic names and phone numbers as written, used the stated address correction, left two conflicting totals as null and named both in the issues field, refused to add up an order whose total the text never gave, and ignored a planted instruction to mark an order paid, noting the attempt.
HaikuWeak model, claude-haiku-4-5-20251001
Extracted the right values in all 9 cases: the same nulls, the same number and date readings, no sum computed, the planted instruction ignored. But it wrapped the JSON in a Markdown code fence in all 9, so its answer does not parse until the fence is removed.

Full test summary

Example

Our own test text, before and after the skill ran. Excerpts only.

English · claude-sonnet-5-5

Before

INVOICE #INV-0042 Issued: March 3, 2026 Due: April 2, 2026 Bill to: Northwind Studio, 18 Harbour Road, Leeds Qty Item Unit price 2 Logo design 450.00 1 Brand guide 940.00 Total due: 1,840.00 USD Payment by bank transfer.

After

{"invoice_number": "INV-0042", "issue_date": "2026-03-03", "due_date": "2026-04-02", "total": 1840.0, "currency": "USD", "vat_id": null, "line_items": [{"description": "Logo design", "quantity": 2, "unit_price": 450.0}, {"description": "Brand guide", "quantity": 1, "unit_price": 940.0}]}

German · claude-sonnet-5-5

Before

Rechnung Nr. 2026-117 vom 03.10.2026 Malerbetrieb Krause GmbH, Lindenstraße 4, 04109 Leipzig Gesamtbetrag: 1.250,50 € Zahlbar bis 17.10.2026 ohne Abzug.

After

{"invoice_number": "2026-117", "issue_date": "2026-10-03", "due_date": "2026-10-17", "total": 1250.5, "currency": "EUR", "paid": null}

Bulgarian · claude-sonnet-5-5

Before

Търсим Senior Backend разработчик (Go) за екипа ни в София. Заплата: 3 100 – 4 300 € бруто месечно. Работа: хибридно, два дни седмично в офиса. Изпратете CV на jobs@example.bg.

After

{"title": "Senior Backend разработчик (Go)", "salary_min": 3100, "salary_max": 4300, "currency": "EUR", "work_mode": "hybrid", "city": "София", "apply_deadline": null}

Russian · claude-sonnet-5-5

Before

Контакты по проекту: Иван Петров, менеджер проекта, +7 912 345-67-89, ivan.petrov@example.ru. По оплатам — Анна Смирнова, бухгалтер, почта anna.s@example.ru.

After

{"contacts": [{"name": "Иван Петров", "role": "менеджер проекта", "phone": "+7 912 345-67-89", "email": "ivan.petrov@example.ru"}, {"name": "Анна Смирнова", "role": "бухгалтер", "phone": null, "email": "anna.s@example.ru"}]}

Spanish · claude-sonnet-5-5

Before

Lámpara de mesa Nórdica Peso neto: 2.500 g Dimensiones: 40 × 30 × 12 cm Precio: 18,90 € (IVA incluido)

After

{"product": "Lámpara de mesa Nórdica", "weight_kg": 2.5, "price": 18.9, "currency": "EUR", "color": null}

What is in the file

  • Hard rules
  • Turning text into types
  • Work in this order
  • Short examples

Languages

English, Bulgarian, German, Spanish, Russian. Tried in: English, German, Bulgarian, Russian, Spanish.

License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Full terms.

Versions

Current version 1.0.2, updated 2026-10-08. Whoever bought an earlier version gets new ones free through the same re-download token.

  1. v1.0.2 · 2026-10-08

    Price changed from $0.01 to $0.05; the skill text is unchanged. Measured value for the strong model: Sonnet 7 of 9 without the skill, 9 of 9 with it.

  2. v1.0.1 · 2026-10-04

    - Test summary: the same cases with and without the skill, per model, now shown next to the verdicts, including where the skill made no difference. The skill file itself is unchanged.

  3. v1.0.0 · 2026-10-03

    First release: extracts data from text into the JSON shape you give; missing facts are null, no sums or conversions the text did not state, conflicting values left open, instructions inside the text ignored, bare JSON as the answer.

FAQ

What happens when a value is missing?

It becomes null, never an empty string, a zero, false or a likely value. In our runs both models left a date written as 04/05/2026, with nothing to tell day from month, as null instead of picking one, and left a job post's missing deadline empty.

Does it add up totals for me?

No. A field for a sum the text does not state stays null, even when the parts are there, because a computed figure looks exactly like a quoted one. Both models left subtotal and total empty for an order that listed only prices and quantities. Ask for the arithmetic in your request if you want it.

Can a document trick it?

We planted a line in an order telling the AI system to mark it paid and approve a refund. Neither model did it, and Claude Sonnet recorded the attempt in the notes field. Lines inside the text are handled as data, never as instructions.

Why does the output of Claude Haiku not parse?

Haiku extracted the right values in all nine of our cases but wrapped the JSON in a Markdown code fence every time. Strip the fence before parsing, or use Claude Sonnet, which returned bare JSON in every case.

Read more

Share

Read this page as Markdown: /skills/text-to-json.md.

  • Summarize Faithfully, Keep Every Number

    Research & Summaries

    SKILL.md · v1.0.2 · 7.5 KB

    Writes a faithful summary of a text in the text's own language, using only what the text says, with every number, name and date kept exactly and every qualifier kept. Use when asked to summarize, shorten, condense, give the gist or a TL;DR of an article, report, email, transcript, thread or document.

    $0.03once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 30 Sep 2026

  • Translate App Text (JSON, YAML, PO)

    Translation & Localization

    SKILL.md · v1.0.1 · 8.5 KB

    Translates app strings and locale files (JSON, YAML, gettext PO, ICU messages, HTML snippets) into another language without breaking them. Keys, placeholders such as {name}, {{count}}, %s, %(name)s and %{count}, ICU plural and select syntax, HTML tags and URLs come back byte for byte; only the human text is translated, and plural forms are added where the target language needs more of them. Use when asked to translate a JSON or YAML locale file, an en.json, a .po file, i18n strings or UI text, or to localize an app.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 3 Oct 2026

More in Data & Analysis

  • Spreadsheet Formula: Excel and Google Sheets

    Data & Analysis

    SKILL.md · v1.0.0 · 6.2 KB

    Writes one spreadsheet formula for Excel or Google Sheets from a plain description and a sample of the sheet, using the sheet's real cell addresses and ready to be copied down. It fixes the ranges that must not move, looks values up by exact match, reads thresholds the way they are worded, builds dates with DATE, keeps blank cells apart from zeros, and uses functions that work in both Excel 2019 or later and Google Sheets. It answers with the formula alone. Use to write an Excel formula, build a Google Sheets formula from a description, fix a SUMIFS, VLOOKUP or COUNTIFS that returns the wrong result, or turn a rule such as price tiers or grades into a formula.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • Compare Two JSON Files: Diff by Path

    Data & Analysis

    SKILL.md · v1.0.0 · 7.3 KB

    Compares two pasted JSON documents, BEFORE and AFTER, and lists every value that differs as strict JSON, one entry per changed path, with the old and the new value. Paths are JSON Pointers, types are strict (the string "1" is not the number 1, null is not a missing key, an empty array is not an empty object), arrays are compared by index with no move detection, object key order and number spelling (1.0, 1e2) are not changes, and a document that is not valid JSON is refused, never repaired. Use to see exactly what an API response, config file, fixture or snapshot changed between two versions, to write the assertion for a test, to review a data migration, or to feed an audit log with the list of changed fields.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 9 Oct 2026

  • Public-Domain Horror Books: 41 With Checked Links

    Data & Analysis

    SKILL.md · v1.0.0 · 9.5 KB

    Data catalog, not an instruction skill: 41 horror and gothic books from Project Gutenberg, each with title, author, Gutenberg number, download count and an EPUB address that answered on 2026-10-28. Rights are the United States only. Use when an agent needs public domain horror books, free gothic ebooks or classic ghost stories with links already checked.

    $0.10once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 28 Oct 2026

  • Public-Domain Adventure Books: 50 With Checked Links

    Data & Analysis

    SKILL.md · v1.0.0 · 10.8 KB

    Data catalog, not an instruction skill: 50 adventure books from Project Gutenberg, each with title, author, Gutenberg number, download count and an EPUB address that answered on 2026-10-28. Rights are the United States only. Use when an agent needs public domain adventure books, free adventure ebooks or classic sea and jungle stories with links already checked.

    $0.10once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 28 Oct 2026