-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pretty print JSON by default? #82
Comments
It would probably make sense for the new I'll look into it; long term I'd love to implement a full graphical JSON editor. |
I second this! We use jsonb extensively and it'd be a great feature to pretty-print all jsonb data |
I would also appreciate this option very much! |
I would love a feature like this. I emailed Jakob about it yesterday and he referred me to this ticket, so I'm recording my thoughts here. Rather than hovering over the cell to reveal formatted JSON content, I would rather be able to double-click the cell, or click on a tiny link inside the cell, to reveal a large enough overlay with the pretty JSON inside of it. I suppose the same mechanism could be used for other large or complex types (text, hstore?). I think a JSON editor would be overkill. Neat, but probably unnecessary. |
FWIW, also looking into using Postico for deeper work with JSON. Would be great to see some more support for it. |
Also want deeper JSONB viewer / editor right inside Postico, starting to use it about everywhere, so like "single field column" so a good JSONB view / editor in Postico would be Huge for me, thanks. |
Actually, while we're at it, let's feature-creep this even more! :) For those with the force-touch trackpad, a regular click has the current behaviour, but a force-click on a JSONB column opens up the viewer/editor in an overlay like you get when you force-click a word to get its definition. How cool would that be? |
+1 on this |
Would love to see this |
+2! Having to copy paste to Sublime to view fields. using PG as a document store hybrid system with jsonb field is imho up and growing as a "best of both worlds" solution. |
I think the editor idea is great, but the core feature I'm interested in here is an option to have a readable JSON field that is pretty-printed by default. |
While more full featured support would be nice, a quick solution with a huge impact on my workflow would be: pretty printing JSON columns and allowing me to view that in a new window. |
+1! |
Want to bump this again. Would love the pretty-print-by-default option since it'll make my life so much easier! A quick search reveals that this is the 3rd (4th?) most requested feature/enhancement and the 5th most commented issue. So hoping bumping this would grab your attention @jakob! |
Back here after 10 months, still requesting this. I believe it should be pretty easy to do and shouldn't require a lot of effort for a basic implementation. You could use something like postgres' built-in https://til.hashrocket.com/posts/87ac2dcf6d-pretty-printing-jsonb-rows-in-postgresql |
I was so excited after I got a notification, but, after 4 years, we‘re still here. One can still hope! Thank you for your work @jakob |
OK, so I tried just using the If you want to see what it looks like, you can download a build here: https://eggerapps-downloads.s3.eu-west-1.amazonaws.com/postico-5881.zip While the result is obviously great for displaying JSON data in the sidebar, it's not-so-great when looking at the table view, because all you are going to see now is just some curly braces most of the time. Look at the data column in the following screenshot: Here's a screenshot from Postico 1.5.10 for comparison: I think the best solution would be if Postico showed the formatted data in the sidebar, and the unformatted data in the table view. Unfortunately this is not possible with the current architecture, since the data displayed in the sidebar and in the table view is always identical. So fixing this is not an easy change, and I still need to think about this issue for a bit. |
Thank you for looking into this again @jakob! Personally I would prefer this if I had to choose between the two but I understand this isn't ideal and might actually be disliked by other users. But still hoping you figure this out! 🤞 In the meantime I'll use the new build you uploaded 😄 |
While I agree with @sheharyarn it's not an ideal solution, I also prefer the |
Hey folks, we have been working on some improvements regarding Postico JSON, Any feedback or issues discovered are highly appreciated! Best regards, |
Postico 1.5.18 was released today (download) and contains some JSON fixes, including pretty-pretting of |
I'm closing this issue, since Postico now pretty-prints JSONB values automatically in the sidebar, and displays a minimized form in the table view. The latest build of Postico 2 now additionally allows double clicking a JSON or JSONB cell to open a big popover. This is nice if you don't use the sidebar, or if you want to look at JSON data in the SQL Query view, where we don't yet have a sidebar. (See https://eggerapps.at/postico2/ for the latest preview of Postico 2) |
(edit: sorry, just saw #570. will post there instead!) |
More often then not I want to read the JSON inside the fields. And I'm not storing indentation to save space. Right now there is the Pretty Print JSON option, but I have to click it for every row/field and it changes the field which is rarely what I actually want to do.
One negative aspect of this could be: If the JSON field is pretty printed by default and it's not what you have in the DB it could create confusion. Since only whitespace changes, I wouldn't expect much confusion though. I would love an option to show JSON pretty-printed by default.
The text was updated successfully, but these errors were encountered: