You're viewing a single thread.
Works fine in
vim
24 0 ReplyExcept if it's a single line file, only god can help you then. (Or running
prettier -w
on it before opening it or whatever.)12 0 Replycat file.json | jq
also works9 0 Replyhttps://porkmail.org/era/unix/award#cat
jq < file.json
cat
is for concatenating multiple files, not redirecting single files.4 0 ReplyRender Media works the best
rm file.json
4 0 ReplyYes, Render Media is the best. It's hard to believe that not many people know about this tool. It's also natively installed in all Linux distros.
3 0 Reply
4.2 megs on one line? Vim probably can handle it fine, although syntax won't be highlighted past a certain point
7 0 ReplyI've accidentally opened enormous single line json files more than once. Could be lsp config or treesitter or any number of things but trying to do any operations after opening such a file is not a good time.
5 0 ReplyYeah, very well may be. LSPs always slow down opening big files, so I usually inspect those with an empty/different config
1 0 Reply
Technically every JSON file is a single line, with line break characters here and there
4 0 Reply
:syntax off
and it works just fine.3 0 Reply