jsontab: plugin to view Json files

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

jsontab: plugin to view Json files

Post by *little-brother »

Hi!

Here is my third plugin for Lister to view Json files.

Image: https://raw.githubusercontent.com/little-brother/jsontab-wlx/main/jsontab.png

Features
  • Mixed tree and grid view
  • Column filters
  • Sort data by column click
  • Beautifier and highlighting
  • Supports ANSI, UTF8 and UTF16
  • Open source
Project page - https://github.com/little-brother/jsontab-wlx
Download link - https://github.com/little-brother/jsontab-wlx/releases/latest/download/jsontab.zip

22/10/2021 Plugin was renamed.
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: jsontab: plugin to view Json files

Post by *Hurdet »

Ty for nice plugin.
If the plugin folder contains jsontab.ini then settings will be read from it.
It doesn't seem to work, even for everyone else plugins.

Do it is possible add a action to copy the node path as in xmltab?

Do it is possible also to change the data?
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

Re: jsontab: plugin to view Json files

Post by *little-brother »

It doesn't seem to work, even for everyone else plugins.
Do you rename default.ini into jsontab.ini? What a version of TC/OS are you using?
Do it is possible add a action to copy the node path as in xmltab?
I need to make some reseach about XPath for JSON. Is there standard for it?
Do it is possible also to change the data?
Maybe later.
The main problem is an entire file should be overwritten according to txt-nature of json and therefore any previous formatting will be lost.
The csv and xml have the same issue plus a new one: they don't have file writter in used support libraries. So I should implement it by myself.
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: jsontab: plugin to view Json files

Post by *Hurdet »

little-brother wrote: 2022-03-11, 13:57 UTC
It doesn't seem to work, even for everyone else plugins.
Do you rename default.ini into jsontab.ini? What a version of TC/OS are you using?
I'm missing this, but now also renaming not work.
TC 10, Win10.
Do it is possible add a action to copy the node path as in xmltab?
I need to make some reseach about XPath for JSON. Is there standard for it?
I not would a XPath but a JSON path from root to element. F.e.: $.TEST.One.Test.two..enable[0]
How does this software.
Do it is possible also to change the data?
Maybe later.
The main problem is an entire file should be overwritten according to txt-nature of json and therefore any previous formatting will be lost.
The csv and xml have the same issue plus a new one: they don't have file writter in used support libraries. So I should implement it by myself.
I undstand, it is not need.
Also so it do a great job!
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

Re: jsontab: plugin to view Json files

Post by *little-brother »

I'm missing this, but now also renaming not work.
And after TC restarting?
$.TEST.One.Test.two..enable[0]
I consider to implement it. S. Gössner promotes JSONPath. I don't know how widely it is used. But JSONedit uses this notation.
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: jsontab: plugin to view Json files

Post by *Hurdet »

After TC restarting it work? ty.
JSONPath is good. Ty.

When I load this, TC hang.
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

Re: jsontab: plugin to view Json files

Post by *little-brother »

When I load this, TC hang.
You should downgrade your Windows to 7. Joke :)
The problem was repeated under Win10. It looks like the issue with edit control (Text tab). I'll fix it as soon as possible.
Thanks for the report!
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: jsontab: plugin to view Json files

Post by *Hurdet »

Ok, if I have to wait a lot then I downgrade to Win7 ;-)
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

Re: jsontab: plugin to view Json files

Post by *little-brother »

Bad news: it's a Win10 bug in msftedit.dll :(
msftedit.dll is Richedit-control is used to display text on Text tab. And this component freezes when setting text.
After adding msftedit from Win7 to %TOTALCOMMANDER_PATH% (it force TC to use this library instead system), the plugin is working.
You can download msftedit.dll and do the same thing but it can influence on other plugins or even TC.

It is possible that this can be somehow bypassed, but I do not know how yet.
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: jsontab: plugin to view Json files

Post by *Hurdet »

I tryed to put the dll in plugin folder but freezes every.
ty.
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

Re: jsontab: plugin to view Json files

Post by *little-brother »

You should put the dll near by TOTALCMD64.EXE and restart TC.
But imho it's a not good solution.
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: jsontab: plugin to view Json files

Post by *Hurdet »

Perhaps this can help.
This program first distributed even "msftedit.dll" while now no.
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

Re: jsontab: plugin to view Json files

Post by *little-brother »

I don't know how it can help because it's my app too :)
sqlite-gui had another issue with sticky cursor. Addition msftedit to x32-version solved the problem.
In plugin case it also solves the problem but it can have hidden flaws for TC and other plugins.
Hurdet
Power Member
Power Member
Posts: 620
Joined: 2003-05-10, 18:02 UTC

Re: jsontab: plugin to view Json files

Post by *Hurdet »

How compile the source?
I tried with Visual Studio but not able.
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

Re: jsontab: plugin to view Json files

Post by *little-brother »

I use mingw64
and simple run

Code: Select all

set PATH=c:\mingw64\mingw64\bin;%PATH%
gcc.exe -Wl,--kill-at -shared -static main.c parson.c -o jsontab.wlx64 -m64 -s -Os -lgdi32 -lcomctl32 -luxtheme
The problem is here.
Post Reply