Adding a "field set" or some other identifer for JSON formatted log lines #1121
VimCommando
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Related to:
Can I suggest a JSON format option like
field-set
to help differentiate different line formats within the same JSON file (or no file at all fromstdin
).The way I imagine this working is putting this in the same priority as the current
regex
filters. As I understand it when you open a file withlnav
it:file-pattern
regex
patterns to find the most specific matchFor JSON files, a
field-set
would be an array of expected property names. These would follow the samefield
andvalue
conventions of being text or JSON pointers. An example format might look like this:And if I need a different set of fields rendered, because there are different properites in the JSON, I can use a different
field-set
:This way if I have intermixed logs in a single JSON stream I have a way to distinguish them. This could also solve the limitation of not being able to format JSON streamed to
stdin
.Beta Was this translation helpful? Give feedback.
All reactions