文件历史

24 次代码提交

作者 SHA1 备注 提交日期
Johann Schopplich 5b66523e42 chore: align with spec v3.3
- bump @toon-format/spec to ^3.3.0; update SPEC.md pointer and badges
- docs: align number-form prose with §2 carve-out (canonical in [1e-6, 1e21) or zero; exponent form permitted outside)
- docs/reference/spec.md: add lowercase booleans/null to encoder checklist; add Java to Appendix F language list
- docs/reference/efficiency-formalization.md: drop overstated "matching TOON's requirement" claim
- packages/toon/README.md: drop "What's New in v3.2" section (now stale)

All 593 tests pass (packages/toon: 497, packages/cli: 96). Encoder remains conformant by default under the v3.3 §2 carve-out via String(value).
2026-05-21 10:10:20 +02:00
Johann Schopplich e2b5611d37 docs: quote §7.2 timestamps in examples and propagate dd856fe to docs/cli
Two regrade fixes surfaced by a post-v3.2 verification swarm:

* llm-prompts.md and api.md had ISO-8601 timestamps as unquoted TOON
  values, violating §7.2 (strings containing a colon MUST be quoted).
  The spec repo's examples and packages/toon/README.md already quote
  timestamps; the docs repo had drifted.

* docs/cli/index.md is the docs-site twin of packages/cli/README.md.
  The prior v3.2 swarm (dd856fe) updated the README's --no-strict
  options row and Lenient Decoding prose to cite "header delimiter"
  but did not propagate to the parallel paragraphs in docs/cli/index.md
  (lines 159 and 234).
2026-05-20 12:28:18 +02:00
Johann Schopplich dd856fe590 docs: align prose with v3.2 spec wording
- packages/toon/README.md: drop two v3.1 bullets that crept into the
  "What's new in v3.2" list (canonical empty-array form and \uXXXX
  escape both landed in v3.1).
- docs/reference/api.md: rename "Delimiter mismatches" entry to
  "Header delimiter mismatch" and cite §14.2 – the previous wording
  invited the false reading that non-active delimiter chars in row
  data are an error. Add §14.4 cross-ref to the duplicate-key entry.
- docs/reference/spec.md: include \uXXXX in the §7 escape list; soften
  the charset MUST claim to match §17; en-dash the §-ranges in the
  glance table.
- docs/reference/syntax-cheatsheet.md: rename "Strings with Active
  Delimiter" to "Strings Containing Delimiters" and distinguish
  active-delim (array scope) from document-delim (object field
  values) per §11.1.
- docs/guide/format-overview.md: same active-vs-document distinction
  in the delimiter paragraph; drop incorrect "strict mode" qualifier
  from the unknown-escape error claim (§7.1 rejects unconditionally);
  trim redundant "with leading zeros" parenthetical.
- docs/guide/llm-prompts.md: fix two broken anchors
  (/reference/api#decode → #decode-input-options, similar for
  encodelines); use -o instead of --output for CLI example
  consistency.
- packages/cli/README.md: enumerate what --no-strict actually skips
  in the options table; replace "delimiter consistency" with the
  more specific "header delimiter mismatches" in the Lenient Decoding
  prose to avoid the same false reading the api.md fix addresses.
2026-05-20 10:57:48 +02:00
Johann Schopplich 13110eb975 docs: align guides and API reference with v3.2 spec changes
- Canonical empty-array form (`key: []` / root `[]`) replaces `key[0]:`
  in format-overview, syntax-cheatsheet, and the efficiency-formalization
  worked example. Legacy form still decodes.
- Escape tables grow a `\uXXXX` row covering U+0000-U+001F outside
  \n/\r/\t, with a note rejecting lone-surrogate \uXXXX values.
- "Special characters" lists widened to "any control character (U+0000-U+001F)"
  instead of the LF/HTAB/CR triplet.
- Tabular eligibility note adds the "at least one key" rule so arrays
  containing an empty {} fall back to the expanded list.
- New short example for nested arrays-of-objects as list items (`- [N]:`).
- API reference: Date row gets an info callout noting it's an
  implementation choice the spec leaves open; strict-mode bullet list
  picks up header structure, duplicate sibling keys, path-expansion
  conflicts, and lone-surrogate escapes; Expansion Conflict Resolution
  notes the matching duplicate-key policy.
- §17 IANA anchor fix in getting-started media-type paragraph.
2026-05-20 07:04:27 +02:00
Johann Schopplich 1f53af3582 docs(spec): refresh §17-19 layout, Appendix F, and §14 subsection references
- Drop the removed §17 Interoperability and §19 Core Profile bullets
- Renumber §18 IANA -> §17, add §18 Versioning and §19 IP entries
- Appendix G -> F (Host Type Normalization Examples)
- Update the Sections-at-a-Glance table to the v3.2 layout
- §14.5 -> §14.3 path-expansion reference in the Decoder Checklist
- §14 enumeration covers count/width, syntax/structural, expansion, dup keys
- Encoder Checklist mentions \uXXXX escapes alongside the five base escapes
- Major-version example swapped to v2 -> v3 / v3.1 -> v3.2
- Working Draft date updated to 2026-05-20
2026-05-20 07:04:14 +02:00
Johann Schopplich 9ac3f9ed67 docs: remove explicit JSON type values 2026-05-08 23:23:58 +02:00
Johann Schopplich 4819128859 docs: harmonize prose and fix tab delimiter examples 2026-05-08 23:17:10 +02:00
Johann Schopplich 18864cbd1f docs: add error handling guide 2026-05-08 22:27:28 +02:00
Johann Schopplich 68f66bb5d6 chore: upgrade dependencies 2026-02-19 14:13:39 +01:00
Viliam Kopecký a4538b48e7 feat: toJSON method support for custom serialization (#237)
* feat: add toJSON method support for custom serialization

* fix: prevent infinite recursion

* test: remove redundant toJSON test cases

* docs: add custom serialization details for toJSON method

* test: fix type issues

---------

Co-authored-by: Johann Schopplich <mail@johannschopplich.com>
2025-12-04 14:08:56 +01:00
Johann Schopplich 2c51932d51 feat: add replacer function for encoding transformations and filtering (closes #209) 2025-12-01 17:15:21 +01:00
Mateo Lafalce 412ebcb125 docs: add Efficiency Formalization page (#221)
* Add Efficiency Formalization

* update eff.md && bach.md

* update eff.md

* update literal pipes

* docs: overhaul some wording

* docs: credit @mateolafalce as author

* chore: deps update

* docs: updates

---------

Co-authored-by: Johann Schopplich <mail@johannschopplich.com>
2025-11-28 07:51:08 +01:00
Johann Schopplich f882cb1153 docs: update spec page to match latest version and sections 2025-11-25 10:05:12 +01:00
Johann Schopplich 05abb99a7e feat!: standardized encoding for list-item objects (spec v3) 2025-11-24 14:40:36 +01:00
Johann Schopplich 327bddae55 feat: parse nested tabular arrays in list items with bare hyphen (spec v2.1) 2025-11-24 08:42:30 +01:00
Johann Schopplich 3389179979 docs: overhaul API reference page 2025-11-23 19:47:37 +01:00
Johann Schopplich 5e8822bea8 docs: refactor API reference page 2025-11-23 19:35:19 +01:00
Johann Schopplich a200a9fa54 docs: add recommended media type & file extension 2025-11-23 18:51:50 +01:00
Johann Schopplich 6c57a14009 feat: streaming decode functionality with event-based parsing (closes #131) 2025-11-21 22:29:57 +01:00
Johann Schopplich 1c003c6118 feat(cli): memory-efficient streaming for encoding 2025-11-21 14:02:22 +01:00
Johann Schopplich 2e992aed74 feat: encodeLines for streaming encoding to TOON 2025-11-20 18:37:46 +01:00
Johann Schopplich 3d2788df53 docs: update favicon 2025-11-18 18:44:40 +01:00
Johann Schopplich 0ac629a085 docs(website): highlight benchmarks 2025-11-18 10:14:07 +01:00
Johann Schopplich 4b4f7c05f9 docs: add dedicated docs website 2025-11-18 07:23:10 +01:00