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
The spec specifies that values containing bytes less than or equal to " " (\x20) must be quoted but not escaped.
Specifically with regards to newlines this is rather problematic when parsing incomplete logstreams. Take this example:
Apologies for the rather contrived scenario, but it shows the ambiguity when parsing a logstream rather well. The point here is you don't know whether a newline is the beginning, middle, or end of a log entry. The complete output for the above record(s) could look like this:
So: {out: "\nmsg=", level: "info", time: "2021-07-30T08:24:01.604Z"} and {msg: "\n", level: "error", time: "2021-07-30T08:24:05.004Z"}
The bigger issue here is that there is no way to get back to a "clean slate". The second version could have variations that never cause a parsing error and the parser would keep on having an off-by-one error:
...
moreLines x=1 f="
out="
msg=" level=info time=2021-07-30T08:24:01.604Z
msg="
" level=error time=2021-07-30T08:24:05.004Z
x="is this quoted, who knows
" it might be. It all depends on the first line.
The above could be a long string value, or it could be a bunch of keys with the value true
The text was updated successfully, but these errors were encountered:
The spec specifies that values containing bytes less than or equal to
" "
(\x20
) must be quoted but not escaped.Specifically with regards to newlines this is rather problematic when parsing incomplete logstreams. Take this example:
Apologies for the rather contrived scenario, but it shows the ambiguity when parsing a logstream rather well. The point here is you don't know whether a newline is the beginning, middle, or end of a log entry. The complete output for the above record(s) could look like this:
So:
{msg: " level=info time=2021-07-30T08:24:01.604Z\nmsg="}
Or this:
So:
{out: "\nmsg=", level: "info", time: "2021-07-30T08:24:01.604Z"}
and{msg: "\n", level: "error", time: "2021-07-30T08:24:05.004Z"}
The bigger issue here is that there is no way to get back to a "clean slate". The second version could have variations that never cause a parsing error and the parser would keep on having an off-by-one error:
The above could be a long string value, or it could be a bunch of keys with the value
true
The text was updated successfully, but these errors were encountered: