This repository has been archived by the owner on May 25, 2022. It is now read-only.
Invalid JSON output for list items
, possible too many items?
#10
Labels
I get invalid JSON when I list all items in my vault.
Here are my test cases:
When doing
--response
and manually looking at the output, there's a lack of closing}
to one of the items and then the output is cut off (no closing symbols for the parent elements).If I remove the
--response
part then I get an "unterminated string" error.Hint: Both are suspiciously close to 2¹⁶ = 65536. 🤔
Hint: With the envelope from
--response
, the item that is cut off is earlier in the output.Hint: If I search for any single normal letter like
a
ore
I still get the error. If I add another letter so I would get fewer results, then everything works.Hint: This is not a bug in Python; I'm just using Python as a simple test case. I get the same problem no matter which JSON library or program I use; even raw output can be verified to not being closed correctly.
I suspect that whatever code is writing to STDOUT is not buffering correctly, so it actually writes the maximum number of bytes that it allows and returns that number, but then the method does not write the next chunk of the buffer.
As this codebase is written in JS/Node, then this kind of API would be hidden behind JS-specific abstractions. This Stack Overflow post seems to talk about a similar problem.
The text was updated successfully, but these errors were encountered: