-
Notifications
You must be signed in to change notification settings - Fork 65
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
Faster JSON parsing #583
Comments
I'm slightly worried that this might introduce subtle parsing changes, but it's probably going to be ok. I'll just need to think about how to parameterise and what should be the default. |
|
There is an x <- list(x = 1, y = 1:10)
yyjsonr::write_json_str(x, opts = yyjsonr::opts_write_json(auto_unbox = TRUE))
#> [1] "{\"x\":1.0,\"y\":[1,2,3,4,5,6,7,8,9,10]}" Created on 2024-12-20 with reprex v2.1.1 Integers would have to be explicitly set or set via the |
@m-muecke that's for writing, not reading though. |
Oh which is what we are doing here, duh. |
I was thinking about |
All in all, I think given the difficulties of making this change on global basis, compared to using yyjsonr for your specific API, I don't think it's worth changing httr2 at this time. But I appreciate you bringing this up and thanks for using httr2! |
Since the yyjsonr package is on CRAN now, I wanted to check the openess of having another option for parsing the JSON in
req_body_json()
with yyjsonr, since it seems to be quite a bit faster.Quick benchmark:
Created on 2024-11-14 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: