dardesantis / djson-viewer Goto Github PK
View Code? Open in Web Editor NEWMakes JSON/JSONP easy to read.
Home Page: https://chrome.google.com/webstore/detail/djson-viewer/chaeijjekipecdajnijdldjjipaegdjc
Makes JSON/JSONP easy to read.
Home Page: https://chrome.google.com/webstore/detail/djson-viewer/chaeijjekipecdajnijdldjjipaegdjc
DJSON extensions broken in Version 123.0.6312.59 (Official Build) (arm64)
Just updated chrome browser, and not able to use DJSON extension anymore
I find quite useless to show a totally collapsed JSON.
Also if the JSON is too big, it can be automatically collapsed to avoid lag.
What do you think?
Great job BTW!
Hello,
just wanted to inform you that with the latest browser updates a JSON-viewer was implemented: https://developer.chrome.com/blog/new-in-devtools-118/#syntax
I hope that there is going to be a way to override that with DJSON-Viewer
, since the out-of-the-box one is not that great.
It will be interesting to add a new option preference: Format JSON with collapsed children only for big JSON.
It's not an absolute must have, but will be useful for user working with very big JSON and normal size JSON. When the JSON is big, show collapsed children will avoid Chrome to lag during scrolling. For JSON with normal size, there is no reason to show collapsed children.
I don't know wether it's hard to do, but it can be an interesting new feature.
Thx @dardesantis, the Format JSON with collapsed children option works perfectly in v0.4.3. The option is very useful now!
Maybe we can extend the same logic to the Collapse All button as well, because it's also useless to show totally collapsed JSON here, what do you think?
The option behaviour will be more consistent. And if an user really wants to show a totally collapsed JSON, he can do it manually very easily.
I could swear this worked until fairly recently. When I plug JSON directly into the extension popup dialog and display it, the "view Nested JSON" buttons work as expected. But when it kicks in as a response formatter when retrieving a JSON-like response from a URL, they don't.
Inspecting with dev tools shows that when the extension creates the page, there are onClick event handlers (among others) that handle those buttons. When the response is formatted inline, there are not any event handlers. That being said, the raw/parsed, expand/collapse, options buttons all work, so the original Callum Locke options bar still functions. It's only the stuff inline to the content.
I couldn't find a public URL with nested JSON to test, but I used the following literal both pasted in, and served from a local textfile with python3 -m http.server
:
{
"field": "{\"nestedContent\": { \"nestedValue\": 1 }}"
}
If, for some reason, it turns out you can't put active decorations on displayed text files anymore (i.e. can only attach JS to HTML, etc) you might consider an inline expansion a la the one done by Nested JSON Object Parser.
It just displays the subobject in place of the text values as if it weren't a nested string. That has its own issues because they don't have any way of controlling it or showing you they did that, but you could add an "expand embedded JSON" toggle button to the original options bar and maybe hint in the gutter.
Unfortunately, it's a sloppy fork (looks like a personal project) and they haven't posted their own URL while the metadata still points at the Callum Locke repo. So their code and licensing isn't readily available, but I assume it's pretty straightforward to rewrite the response.
Honestly, I'd prefer that flow over the new page for every nest flow we currently have. That one is a bit painful, especially since reloading the page by mistake breaks it. The files I'm practically having to use this on have multiple levels of nesting, so anything recursive is far easier.
Edit: should clarify, this from the Chrome Web Store, using version 0.6.0. The Chrome version is Version 81.0.4044.122 (Official Build) (64-bit) on Mac.
Create option in the option screen that will allow to start to view the JSON collapsed
Need to create a new option screen where will be required optional permission to access to context menu
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.