-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Provide a jvp_dump_raw_string function to implement the combination o… #1789
base: master
Are you sure you want to change the base?
Conversation
…f flags -r and -a (raw and ascii)
@@ -114,13 +114,18 @@ static void put_indent(int n, int flags, FILE* fout, jv* strout, int T) { | |||
} | |||
|
|||
static void jvp_dump_string(jv str, int ascii_only, FILE* F, jv* S, int T) { | |||
put_char('"', F, S, T); | |||
jvp_dump_string_raw(str, ascii_only, F, S, T); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the string has double-quote characters in it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I guess this isn't new...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's actually a good question.. can jvp_dump_string be tricked into producing bad output?
Hey, thanks for this. |
Escapes are still printed whenever characters outside the ASCII plane are encountered. To avoid ambiguity, backslash is the only ASCII character escaped (as `\\`). Fixes jqlang#1788, properly this time. Closes jqlang#1789.
Escapes are still printed whenever characters outside the ASCII plane are encountered. To avoid ambiguity, backslash is the only ASCII character escaped (as `\\`). Fixes jqlang#1788, properly this time. Closes jqlang#1789.
Escapes are still printed whenever characters outside the ASCII plane are encountered. To avoid ambiguity, backslash is the only ASCII character escaped (as `\\`). Fixes jqlang#1788, properly this time. Closes jqlang#1789.
Escapes are still printed whenever characters outside the ASCII plane are encountered. To avoid ambiguity, backslash is the only ASCII character escaped (as `\\`). Fixes jqlang#1788, properly this time. Closes jqlang#1789.
Escapes are still printed whenever characters outside the ASCII plane are encountered. To avoid ambiguity, backslash is the only ASCII character escaped (as `\\`). Fixes jqlang#1788, properly this time. Closes jqlang#1789.
…f flags -r and -a (raw and ascii)