Closed VVKot closed 3 years ago
Example output if I just print(data)
above the offending line:
[
{
"Date": "2021-01-21T19:01",
"ID": "inbox",
"Meta": {
"date": "2021-01-21T19:01",
"tags": []
},
"Path": "./inbox.md",
"Slug": "inbox",
"Title": "Inbox"
}
]
Ah I see, that's because plenary was calling this function for every line! That all makes sense now, and linked PR indeed fixes the issue. Thanks @jqfeld! ❤️
After https://github.com/srid/neuron/pull/572 the output of
neuron query
is pretty-printed, and this trips up decoding the JSON. The error messages are thrown here - but I am not sure how to fix it. https://github.com/oberblastmeister/neuron.nvim/blob/4a92912eec159faff27c56cfe7683cd5d09145fc/lua/neuron/cmd.lua#L79It seems that string contains some linebreaks that can not be handled by
json_decode
, and those are not\n
s or\r
s - I tried substituting those. @oberblastmeister maybe you happen to know how to fix it?