[Feature Request] JSON viewer?

jaCUBE posted 4 years ago in Feature discussion
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.

ansgar posted 4 years ago
How should HeidiSQL detect that you have JSON stored in your text field?
jaCUBE posted 4 years ago
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. ;)
jaCUBE posted 4 years ago
Maybe better would be call it "Try to parse JSON". :)
ansgar posted 4 years ago
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 posted 4 years ago
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 posted 4 years ago
SynEdit now has a JSON formatter.

indospace posted 11 months ago

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.

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