Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

[Feature Request] JSON viewer?

jaCUBE's profile image jaCUBE posted 4 years ago in Feature discussion Permalink
Hi there.

Is there any intention of adding some kind of JSON viewer/editor for fields which stores JSON data? Or into the Text Editor when I edit those fields?

I mean JSON editor like this i.e.: http://www.jsoneditoronline.org/

In my case, I store some array dumps in error log in database and I can imagine this would be much more comfortable way of reading JSON then just plain text. :)

Thanks for the answer.

jaCUBE
ansgar's profile image ansgar posted 4 years ago Permalink
How should HeidiSQL detect that you have JSON stored in your text field?
jaCUBE's profile image jaCUBE posted 4 years ago Permalink
Well, it came up on my mind and accoding to Stack Overflow, there might be some regex options for this: http://stackoverflow.com/questions/2583472/regex-to-validate-json

However, I doubt one more click would be some problem for anyone.smileI think maybe something like this in picture? http://i.imgur.com/sIwIFUC.png
Then it would be on my responsibility to click "View JSON" button.

Anyway, please, consider this just like an idea how to make HeidiSQL even more cooler than it is. ;)
Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
jaCUBE's profile image jaCUBE posted 4 years ago Permalink
Maybe better would be call it "Try to parse JSON". :)
ansgar's profile image ansgar posted 4 years ago Permalink
I don't think I can make a clickable tree fron Json content. But I can probably add syntax highlighting for various different languages, including json. And then provide a dropdown menu for selecting the language. That's not a big deal probably because I already have SynEdit for SQL highlighting.
jaCUBE's profile image jaCUBE posted 4 years ago Permalink
Oh, never mind. Syntax highlighting for JSON/XML would be neat too. I think these are only major languages stored in database and HeidiSQL supporting them would remove some pain. :)

Thank you.
Mrbaseball34's profile image Mrbaseball34 posted 4 years ago Permalink
SynEdit now has a JSON formatter.

https://bitbucket.org/sas_team/synedit-git/commits/42763857ac2cfc58dfa60e55b5d75ace1531cdb7
indospace's profile image indospace posted 1 year ago Permalink

Love how others are thinking the same.

In mySQL there is a DataType: JSON

The logic could be if DataType == 'JSON' OR DataType == 'LONGTEXT'

Then display a JSON viewer/formatter component.

This would make HeidiSQL an absolute God product.

ZuLuuuuuu's profile image ZuLuuuuuu posted 2 months ago Permalink

Being able to edit JSON fields (or text fields as JSON since old MySQL versions don't support native JSON type) would be much appreciated. It does not need to be expandable tree or something. Just an option to prettify the indents and syntax highlighting is enough.

DB Browser for SQLite is perfect in this regard, it gives you an option to automatically guess the text mode (text, JSON, XML) or let's you select the mode manually. It also gives you a toggle button to automatically prettify the JSON or not.

Please login to leave a reply, or register at first.