Skip to content

Treat TypeError also as non-numeric - #290

Merged
mielvds merged 1 commit into
masterfrom
146-non-json-scalar
Jun 26, 2026
Merged

Treat TypeError also as non-numeric#290
mielvds merged 1 commit into
masterfrom
146-non-json-scalar

Conversation

@mielvds

@mielvds mielvds commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Fixes #146. _is_numeric() now treats TypeError like ValueError, so non-JSON scalar objects such as datetime.date get stringified instead of crashing.

@github-actions

Copy link
Copy Markdown

@mielvds
mielvds merged commit f2c9142 into master Jun 26, 2026
20 checks passed
@mielvds
mielvds deleted the 146-non-json-scalar branch June 26, 2026 12:56
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.

jsonld.expand() fails if the document contains a value which does not plainly serialize to JSON

2 participants