Skip to content

vendor/jsonx: improve correctness and performance#470

Open
fredrikekre wants to merge 1 commit into
JuliaIO:masterfrom
fredrikekre:fe/jsonx
Open

vendor/jsonx: improve correctness and performance#470
fredrikekre wants to merge 1 commit into
JuliaIO:masterfrom
fredrikekre:fe/jsonx

Conversation

@fredrikekre

Copy link
Copy Markdown
Contributor

Some minor things that Claude commented on while I was using the jsonx vendored
implementation. See commit message for details.

- skip_whitespace: compare bytes directly against the 4 RFC 8259
  whitespace characters instead of isspace(Char(...)). ~2x faster and
  correctly rejects vertical tab / form feed which isspace accepts but
  JSON does not.
- parse_number: replace try/catch with tryparse — ~500x faster on the
  happy path, ~1400x on Int64 overflow. Also reject leading '+' which
  is not valid per the JSON spec.
- parse_array: use explicit Any[] instead of untyped [].
- tests: add cases for leading '+', vertical tab, and form feed.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.41%. Comparing base (e346208) to head (04c7aa5).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #470   +/-   ##
=======================================
  Coverage   90.41%   90.41%           
=======================================
  Files           7        7           
  Lines        1419     1419           
=======================================
  Hits         1283     1283           
  Misses        136      136           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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