Skip to content

fix(encoder): reject strings with unpaired surrogates - #202

Merged
jenspapenhagen merged 3 commits into
mainfrom
triage/reject-unpaired-surrogates
Oct 3, 2026
Merged

jenspapenhagen merged 3 commits into
mainfrom
triage/reject-unpaired-surrogates

Conversation

@johannschopplich

Copy link
Copy Markdown
Member

§3 requires encoders to error on a string with an unpaired surrogate instead of emitting it. Keys and string values now throw IllegalArgumentException. The tests stay in this repository because a JSON fixture can't carry a lone surrogate portably – serde_json rejects it and Go's encoding/json replaces it with U+FFFD.

@johannschopplich
johannschopplich requested a review from a team as a code owner October 2, 2026 06:30
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 96.89% 🍏
Files changed 100% 🍏

File Coverage
JToon.java 100% 🍏
PrimitiveEncoder.java 98.51% 🍏

@jenspapenhagen
jenspapenhagen merged commit 0a9f64b into main Oct 3, 2026
1 check passed
@jenspapenhagen
jenspapenhagen deleted the triage/reject-unpaired-surrogates branch October 3, 2026 09:38
@johannschopplich johannschopplich mentioned this pull request Oct 3, 2026
3 tasks done
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.

2 participants