File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ newline-delimited JSON is somewhat common in practice. It's nice to have
217217this here instead of having to reimplement it in a bunch of different
218218applications.
219219
220- Note: To protect against malicious input, this reject byte sequences with
220+ Note: To protect against malicious input, this rejects byte sequences with
221221more than 10 million newlines. If this is causing a problem for you, open
222222an issue.
223223
Original file line number Diff line number Diff line change @@ -123,6 +123,12 @@ tests = testGroup "Tests"
123123 @=?
124124 BChunks. concat (Builder. run 4 (J. encode (J. String " It\2019s over now" )))
125125 ]
126+ , testGroup " decodeNewlineDelimited"
127+ [ THU. testCase " no-trailing-newline" $
128+ Right (Exts. fromList [J. emptyObject, J. emptyObject])
129+ @=?
130+ J. decodeNewlineDelimited (shortTextToBytes " {}\n {}" )
131+ ]
126132 , testGroup " objectFromList"
127133 [ THU. testCase " empty object" $
128134 J. objectFromList []
You can’t perform that action at this time.
0 commit comments