HugeJsonViewer icon indicating copy to clipboard operation
HugeJsonViewer copied to clipboard

Possibly Mal-formed JSON, only opened first item.

Open afarlie opened this issue 2 years ago • 2 comments

Describe the bug

When opening a potentially mal-formed JOSN in which each line of the file consists of an object bounded by { } delimiters but no comma as a line terminator, the viewer only opened the first item present in the file.

To Reproduce (using minimal example)

Create a JSON consisting of the following :

{object_id:"1" , type:"event", channel:"2"}
{object_id:"2" , type:"event", channel:"2"}

Each item is on it's own line, but there are no commas between the {} delimited items or as a line terminator.

Open the file in HugeJosnViewer

Expected behaviour

Viewer should display each item it found individually.

Desktop (please complete the following information:

  • OS: Windows 7 - 32 bit
  • Version of HugeJsonViewer: 0.4,12,18 (30/06/2023)

Additional context I was wanting to use the viewer to filter search a specfic data file generated from an activity log file in a Discord personal data package, which contains JSON style data in a possibly mal-formed format.

afarlie avatar Jun 30 '23 17:06 afarlie

I'd expect the viewer not to open the file at all and give an error message that it's not valid JSON.

WelliSolutions avatar Jul 01 '23 18:07 WelliSolutions

See also Issue 12 - https://github.com/WelliSolutions/HugeJsonViewer/issues/12 about newline delimited JSON which I suspect is the situation here. I use the term mal-formed because I wasn't sure the newline delimited format was proper JOSN.

What would be nice is a way of converting the newline delimited form into something which is readable.

Alternatively do you have a more detailed technical explanation stating why the newline delimited form isn't JOSN, so I can file an appropriately worded bug ticket with Discord?

afarlie avatar Jul 01 '23 18:07 afarlie