Skip to content

feat(typia): align lenient parse recovery with TS parity#336

Merged
kdy1 merged 1 commit intomainfrom
kdy1/typia-llm-json-ts-parity
Mar 28, 2026
Merged

feat(typia): align lenient parse recovery with TS parity#336
kdy1 merged 1 commit intomainfrom
kdy1/typia-llm-json-ts-parity

Conversation

@kdy1
Copy link
Copy Markdown
Contributor

@kdy1 kdy1 commented Mar 27, 2026

Summary

  • align Rust typia lenient JSON EOF recovery with upstream TS behavior
  • add upstream parse parity test coverage (66 mapped parse cases)
  • expand runtime validate/stringify boundary tests
  • sync typia contracts/docs with parity baseline and explicit exclusions

Details

  • update crates/typia/src/lenient_json.rs to recover truncated EOF inputs without parser-token errors
  • keep syntax/token violations and depth guard as failures
  • add crates/typia/tests/llm_json_parse_parity.rs with table-driven parity checks
  • update crates/typia/tests/llm_data_runtime.rs expectations for recovery semantics
  • update docs:
    • docs/crates-typia-core-foundation.md
    • docs/project-typia.md
    • crates/typia/README.md

Explicit parity exclusions

  • JS undefined expectations
  • non-finite numbers (Infinity, -Infinity)
  • lone-surrogate code-unit expectations

Validation

  • cargo test -p typia
  • cargo test

@kdy1 kdy1 merged commit c8187e0 into main Mar 28, 2026
16 checks passed
@kdy1 kdy1 deleted the kdy1/typia-llm-json-ts-parity branch March 28, 2026 00:01
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