Like always it's the edge cases, that make things complicated ;).
I earlier thought that we support JSON as of RFC 7159 for each line, which means that "test", true or "1" would be valid lines.
However in the spec we are referencing Crockford's RFC 4627, which only allows JavaScript objects as valid JSON and we are also specificly stating "JSON objects" to be used for each line.
I would suggest allowing RFC 7159 JSON for each line, so that streams like:
1
2
3
4
would be valid NDJSON.
What are your thoughts? In any way I think we should be a bit more specific about this in the spec.
Hey everyone,
Like always it's the edge cases, that make things complicated ;).
I earlier thought that we support JSON as of RFC 7159 for each line, which means that
"test
",true
or "1" would be valid lines.However in the spec we are referencing Crockford's RFC 4627, which only allows JavaScript objects as valid JSON and we are also specificly stating "JSON objects" to be used for each line.
I would suggest allowing RFC 7159 JSON for each line, so that streams like:
would be valid NDJSON.
What are your thoughts? In any way I think we should be a bit more specific about this in the spec.
Best, Finn