Skip to content

Gracefully handle Number for BigInt fields#1346

Merged
timostamm merged 1 commit into
mainfrom
tstamm/Gracefully-handle-Number-for-BigInt-fields
Jan 23, 2026
Merged

Gracefully handle Number for BigInt fields#1346
timostamm merged 1 commit into
mainfrom
tstamm/Gracefully-handle-Number-for-BigInt-fields

Conversation

@timostamm

Copy link
Copy Markdown
Member

When a Number value is assigned to a BigInt field (e.g. protobuf field int64), toJson raises an error. The error message is confusing because the underlying code does support serialization of Number, and does not provide meaningful error details.

This PR relaxes the validation in toJson to gracefully handle serialization of integral Number values.

Fixes #1345.

@timostamm timostamm merged commit b9e4d8b into main Jan 23, 2026
26 checks passed
@timostamm timostamm deleted the tstamm/Gracefully-handle-Number-for-BigInt-fields branch January 23, 2026 14:39
@timostamm timostamm mentioned this pull request Apr 23, 2026
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.

toJson raises confusing error when serializing Number assigned to a BigInt field

2 participants