You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+1 for this, as it's the only blocker to me switching much of my code that uses {jsonlite} to {yyjsonr} instead.
I took a brief look at the yyjson docs and think the canonical way to do this is:
Parse the "json"-classed string (i.e. length-1 STRSXP) into a new yyjsonr doc (call it *x).
Insert x into the recursively-growing parent doc.
It looks like yyjson requires that first parsing step to force validity of the growing structure (prior to serialization), though it smells a bit of inefficiency (if we know a priori that the string is guaranteed to be valid JSON). Nevertheless, if there's general agreement from the maintainers here that this is indeed the appropriate approach, I'm happy to take a stab at a PR to implement this feature.
A closer look at the yyjson architecture suggests that one might be able to skip the parsing step (mentioned above) and set an element's value to a "raw" *char.
Could we optionally skip json serialisation of character vectors that are already json? This is {jsonlite}'s
json_verbatim = TRUE
option. Example:Expected output
The text was updated successfully, but these errors were encountered: