Skip to content

Conversation

0x0f0f0f
Copy link
Contributor

Needed after #302 (comment) - it's an important security
fix to use parse instead of read - if exposed in packages implementing public HTTP APIs it allows people
to read arbitrary files on the host machine FS

@hhaensel
Copy link

hhaensel commented Feb 17, 2025

Moreover, parsing time gets better if you process many small messages. On my Windows system parsing is more than a factor of 100 faster in the second benchmark of #294 (comment) from 6ms down to 45µs.

@hhaensel
Copy link

BTW, shouldn't there also be a parse!(str::AbstractString, x::T; kw...) and parsefile!(str::AbstractString, x::T; kw...) for incremental structure parsing?

@0x0f0f0f
Copy link
Contributor Author

Any news on this?

@hhaensel
Copy link

hhaensel commented Mar 18, 2025

If you need it but it doesn't get patched, you can use

JSON3.read(codeunits(s))

as a temporary workaround

Copy link
Owner

@quinnj quinnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the slowness here; bogged down w/ a lot of other stuff (julia and not). Will. make a new release.

@quinnj quinnj merged commit fb220e5 into quinnj:main Mar 28, 2025
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.

3 participants