Skip to content

feat: compliance with TOON v3.0, added official test fixtures#1

Merged
alesanfra merged 4 commits intomainfrom
feature/spec-compliance
Feb 3, 2026
Merged

feat: compliance with TOON v3.0, added official test fixtures#1
alesanfra merged 4 commits intomainfrom
feature/spec-compliance

Conversation

@alesanfra
Copy link
Owner

No description provided.

- Check for blank lines before depth calculation to prevent premature object termination
- Use explicit_indent in depth calculation when provided instead of only auto-detected indent_size
- Use actual next line depth for nested objects in non-strict mode with auto-detected indent
- Prevents blank lines between nested fields from breaking parsing
- Fixes non-multiple indentation handling (e.g., 3 and 5 spaces with indent=2)

All 513 tests now pass (100% compliance with TOON v3.0 spec)
- Created src/toon/ directory structure
- Moved serialization logic to src/toon/serialize.rs (1186 lines)
- Moved deserialization logic to src/toon/deserialize.rs (1176 lines)
- Created src/toon/mod.rs as public API (91 lines)
- Updated src/lib.rs to fix parameter order for serialize calls
- All 513 tests still passing - no functional changes
…ation

- Fixed key_folding to only enable when explicitly set to 'safe', 'on', or 'always'
- Added indent validation to reject indent < 2 with ValueError
- All 513 tests passing
@alesanfra alesanfra merged commit 58f1459 into main Feb 3, 2026
26 of 32 checks passed
@alesanfra alesanfra deleted the feature/spec-compliance branch February 3, 2026 07:20
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