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 specs are not 100% clear in my opinion, regarding empty strings. Are those valid Jason Lines?
The second bullet point in the specs says
Each Line is a Valid JSON Value
The most common values will be objects or arrays, but any JSON value is permitted.
This allows two viewpoints:
An empty string is invalid, as the first and only line is no valid Json value.
It is valid, as there are no lines at all, therefore all lines are valid.
The Validator on the website says it is valid. However it is also somewhat contradictory because a single /n is shown as invalid, although bullet point 3 of the spec says that a single /n at the end of the file is ignored, therefore either both ("", and "/n") should be valid or invalid.
Could you provide some clarification?
The text was updated successfully, but these errors were encountered:
I agree with @Haatschii, that empty input should be valid, because JSON Lines is essentially defining an array. If you have an array of arrays there would be no way of indicating a zero length top level array.
Thank you we should word this so that it's clear. An empty file is valid but a file with only \n is not because \n indicates the end of a valid record. Any suggestion on better wording?
The specs are not 100% clear in my opinion, regarding empty strings. Are those valid Jason Lines?
The second bullet point in the specs says
This allows two viewpoints:
The Validator on the website says it is valid. However it is also somewhat contradictory because a single /n is shown as invalid, although bullet point 3 of the spec says that a single /n at the end of the file is ignored, therefore either both ("", and "/n") should be valid or invalid.
Could you provide some clarification?
The text was updated successfully, but these errors were encountered: