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
I suggest changing "may contain newlines" in https://github.com/ndjson/ndjson-spec#31-serialization to must not contain newlines. That makes it much simpler to implement the parser,
split on newlines, and then parse with existing json library.
If the strings may contain newlines, you need a special parser that understands dnjson,
because you need to match brackets and check whether you are inside a string, etc,
to know whether a given newline delimits json objects, or is merely inside the json.
Alternatively, allow newlines but only non-consecutive newlines, and then make the delimiter two new lines.
The text was updated successfully, but these errors were encountered:
Ah, okay. Thanks for your input anyways!
There also was a discussion about pretty printed JSON over here #1 The option of using \n\n as a separator wasn't considered though.
I suggest changing "may contain newlines" in https://github.com/ndjson/ndjson-spec#31-serialization to must not contain newlines. That makes it much simpler to implement the parser,
split on newlines, and then parse with existing json library.
If the strings may contain newlines, you need a special parser that understands dnjson,
because you need to match brackets and check whether you are inside a string, etc,
to know whether a given newline delimits json objects, or is merely inside the json.
Alternatively, allow newlines but only non-consecutive newlines, and then make the delimiter two new lines.
The text was updated successfully, but these errors were encountered: