-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
nan123 #3023
Comments
jq can and does parse JSON texts concatenated without whitespace when the parse would be unambiguous, but one really should include some whitespace when concatenating JSON texts. It's not clear to me that |
So I guess maybe we want to discuss whether we want to support parsing of JSON texts concatenated w/o whitespace(s). How should jq parse How should jq parse Maybe And so it goes for all combinations of texts other than objects, arrays, and strings. Back when I wrote RFC 7464 we had lengthy discussions on the WG mailing list about this. My original intent had been to standardize the "jsonlines" data format, but as this was going to be a Standards-Track RFC the WG consensus is what mattered, and the WG consensus was that we should do something to disambiguate append failures, and thus JSON text sequences are nothing like "jsonlines". But the discussion you'll find in the JSON WG mailing list archives may yield some insights. The argument that |
No, this is positive NaN with payload so nan123 is parsed as one value. This is confusing behavior though. |
To be clear, the point is that the current processing of It seems to me that silent loss of data is akin to silent errors, and thus devoutly to be avoided. |
I'm aware of signalling NaNs, but again, JSON doesn't support NaNs, and while jq does, jq doesn't support creating a NaN with a particular signal or reading the signal from a NaN value either. jq does have a JSON extension to parse NaNs, but it doesn't support signals in those either.
Ah, I see. Sure, |
I just wanted to mention the numbers are consumed as a part of NaN token, knowing it's not actually handled in the execution. https://jqplay.org/s/7vOnfN4jJIM |
jq is inconsistent in the way it handles squished entities when reading from STDIN:
Swallowing input silently probably isn't such a good idea.
Incidentally,
nan123
was an oss-fuzz idea (so to speak).The text was updated successfully, but these errors were encountered: