Skip to content

Conversation

@bnomei
Copy link

@bnomei bnomei commented Jan 7, 2026

Linked Issue

Closes #

Description

Fix decoder correctness for keys, delimiters, path expansion, numeric rules, and option wiring. This allows keyword keys in key context, enforces ASCII unquoted key rules in strict mode, fixes delimiter scoping in nested arrays, preserves quoted dotted field names, and wires coerce_types and delimiter options correctly. It also adjusts handling for negative leading-zero numbers, unquoted tabs, and multiple internal spaces. This is PR 2 of 8 in the intended sequence (1-8).

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test coverage improvement

Changes Made

  • Allow keyword keys in key context and enforce ASCII unquoted key rules in strict mode.
  • Fix delimiter scoping and header/field-list consistency; preserve quoted dotted field names in path expansion.
  • Wire coerce_types and delimiter options; adjust leading-zero negatives, tabs, and internal space handling.

SPEC Compliance

  • This PR implements/fixes spec compliance
  • Spec section(s) affected: unquoted keys, delimiters, path expansion, numeric and quoting rules
  • Spec version: v3.0

Testing

  • All existing tests pass
  • Added new tests for changes
  • Tests cover edge cases and spec compliance

Tests run: cargo test

Pre-submission Checklist

  • My code follows the project's coding standards
  • I have run code formatting/linting tools
  • I have added tests that prove my fix/feature works
  • New and existing tests pass locally
  • I have updated documentation if needed
  • I have reviewed the TOON specification for relevant sections

Breaking Changes

  • No breaking changes
  • Breaking changes (describe migration path below)

Migration path:

Additional Context

Branch: fix/decoder-correctness
Intended PR order: 1-8 (this is PR 2 of 8)

@bnomei bnomei requested a review from a team as a code owner January 7, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant