paolosimone / virtual-json-viewer Goto Github PK
View Code? Open in Web Editor NEWJSON browser extension with virtual DOM, search and JQ filtering
License: Other
JSON browser extension with virtual DOM, search and JQ filtering
License: Other
Hi Paolo,
I discovered this project in your response to my comment about JSON viewers yesterday, great job with this extension!
I've been using it for a little while today and noticed that while you already detect when the theme is changed in the options, the same doesn't happen when the system itself (the desktop really) switches modes. So changing the mode in the options applies the chosen theme immediately, but if you have "system" selected and the desktop itself switches, the theme doesn't change until the tab is reloaded.
Steps to reproduce:
It seems like just adding a watcher function with setInterval
to detect this would likely be enough, although I can't say I'm qualified enough to make recommendations on Chrome extensions :-)
This is clearly a pretty minor issue, but I figured that since you had already gone through the effort of applying the theme immediately using a storage event listener when the options are changed, you might want to have each page do the same when the desktop switches modes too.
Could you please define default keyboard shortcuts at least for
Great experience with this extension so far. Currently, the extension sorts based on keys and displays as a tree view. Can you please consider providing an option to disable sorting?
It would be nice to have such feature.
Great experience with the extension so far, coming from plain JSONVue.
I'd love to be able to set expanded/collapsed as a default in settings.
Usually I like to get an overview real quick and this would save me a click or ctrl+e a bunch of times.
It would be nice to set some default application state in extensions settings so that they are applied when opening a new page, e.g. viewer mode (tree/raw) or search visibility (all/subtree/matches).
This is quite a challenge because extensions settings are loaded in async and are not available on first render when the application state is set in session storage. Need to convince React that it can be done.
Hi,
Could you please make it possible to use MacOS keyboard hotkeys for text selection, such as:
Select text to beginning of a line – Shift+Command+Left Arrow
Select text to end of a line – Shift+Command+Right Arrow
Select text to beginning of current word – Shift+Option+Right Arrow
Select text to end of current word – Shift+Option+Right Arrow
Select text to beginning of all text – Shift+Command+Up Arrow
Select text to end of all text – Shift+Command+Down Arrow
( or introduce some new hotkeys for text selection, for example like https://www.jetbrains.com/go/guide/tips/expanding-shrinking-selection/ ) in virtual-json-viewer plugin's in Tree mode?
Because it's currently hard to copy text in that mode, for example UUIDs
I would like to see have some setting which allow me to see searching result context in Tree mode.
For example, let's say I need to search "Merry" text occurrences here https://api.github.com/users/paolosimone/repos
Current searching result:
I would also like to see all other attributes of the json array element
Currently CTRL + A selects the whole page content when in raw json format
Example of programmatic selection: http://jsfiddle.net/5crgL/3/
I get a "Unexpected non-whitespace character after JSON at position 7509" when trying to use jq filtering. If I use jq from the cmd line the filtering works fine.
Is there a way to get more debug info about the JSON in question?
The JSON does contain UTF like "GÖTEBORG" and "Højrup"
When I load a json from a remote host served with strict Content Security Policy (CSP) rules, the JQ filter bar is not showing.
Example: https://api.github.com/users/paolosimone/repos
This happens because JQ filtering relies on WebAssembly, but WASM execution is enabled only if CSP allows the execution of unsafe code ('script-src': 'unsafe-eval'
)... even if the wasm file is the one bundled with the extension package!
Error: Wasm code generation disallowed by embedder
References:
The recommended approach is to run wasm code in a sandbox and send/receive data through message passing. This solution introduces an additional overhead due to serialization/deserialization of the message content (in our case, the JSON itself).
How much overhead? Will it continue to work smoothly with ~10MB json?
Don't know, I guess we could give it a try (at least as a fallback strategy) before jumping to conclusion.
I feel you. In the meantime you could download the json (floppy disk icon) and load the file in the browser.
Chrome is deprecating Manifest V2.
Timeline: https://developer.chrome.com/blog/mv2-transition/
curl https://wttr.in/Detroit\?format\=j1 | jq '.weather|.[].date' [2022-05-19 23:58:52]
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 48898 100 48898 0 0 112k 0 --:--:-- --:--:-- --:--:-- 115k
"2022-05-19"
"2022-05-20"
"2022-05-21"
works as expected but Virtual Json Viewer plugin throws Unexpected string in JSON at position 13
error for the same expression:
.weather|.[].date
See also https://jqplay.org/s/DHmRZozMOj9
Could you please fix it and make my life easier?
Could you please implement it?
Request from @RVFET (original comment here)
Would be great if the extension could fallback to trying to parse the response into json even when content type does not match any json format, just as a last chance, it'd be a great addition. I'm aware that it'd create some performance bottlenecks since it'd need to check every page you visit but it could be an option that we can toggle, or perhaps manual wildcard/regex based custom website matching could help a ton, too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.