Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape JSON property names in regex #724

Merged
merged 1 commit into from
Mar 3, 2024
Merged

Conversation

sami-t
Copy link
Contributor

@sami-t sami-t commented Mar 3, 2024

I came across this bug while trying (and failing) to generate valid JSON based on a schema where property names contained parentheses. Since JSON property names can contain special characters, we should escape them while generating the schema's regular expression.

@rlouf rlouf merged commit 0488ad2 into outlines-dev:main Mar 3, 2024
5 checks passed
@rlouf
Copy link
Member

rlouf commented Mar 3, 2024

Thank you for the fix!

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.

None yet

2 participants