LogViewPlus Support

Display JSON as Collapsible Tree

https://www.logviewplus.com/forum/Topic1078.aspx

By SoBeGuy - 2 Aug 2021

In the bottom pane, we have the option to do display JSON pretty printed. It would be better if there was also an option to expand and collapse each level of the object hierarchy, making it convenient to drill down to properties nested deeply within the JSON object. Also, a search box above the pane, so you could search within a specific log entry.
By LogViewPlus Support - 3 Aug 2021

Hi Brad,

Thanks for the feedback.

This text area is built for speed and simplicity.  What we have done instead to implement this kind of functionality is added support for opening the individual log entry in a text editor.  You can do this by pressing F8 or right-clicking in the text area.



The text editor used is either the one you have configured in LogViewPlus, or the default Windows editor for *.txt files.  Target files will be stored in the temp directory with the appropriate file extension (txt, JSON, or XML).

Hope that helps,

Toby
By SoBeGuy - 3 Aug 2021

Yeah, I was aware of the capability, but it would be super-nice to have a built-in JSON viewer. I'd suggest that the text area have two tabs. The first tab would display the raw content, as it does now The second tab would display the formatted content. If it detects JSON or XML, it could display the formatted content as a collapsible tree.
By LogViewPlus Support - 3 Aug 2021

It is something that I would like to add as well.  I agree there is room for improvement here, but this is not something we will be looking at in the short term.  There are other application areas that we want to improve first.
By SoBeGuy - 11 Nov 2021

Let's take this a step further. How about a preview pane that could be configured to display each field using a viewer specific to the field. So you could create a form view for each log entry. For example, I'm logging my outgoing emails as JSON objects. Therefore, I'd like to be able to click on a log entry and have it display the email in the preview pane, much like how it would be displayed in an email client.

You'd have Date, From, To, and Subject fields as text fields, then the Body field would render as HTML. This would really take LVP to the next level!
By LogViewPlus Support - 11 Nov 2021

Thanks for the feedback Brad.

When we implement this feature, we will definitely be adding a new custom extension type which would allow users to write their own viewer.  Unfortunately, we have a backlog of ideas at the moment, so I am not sure when we will be able to implement this.  It is a big feature with usability and performance implications which needs some more thought so that it is a clear value add for all users.