KraigM / HomeBridgeController

Provides a simplified UI for controlling your HomeBridge
88 stars 7 forks source link

Raw Settings View : Syntax checking #3

Closed epheterson closed 8 years ago

epheterson commented 8 years ago

Prior to uploading the config, it'd be nice if the app verified that the config would actually work by, at the very least, matching all brackets and highlighting issues.

KraigM commented 8 years ago

Right now it will at least validate the json (sort of). I made sure to read the text into a strong JSON library (Newtonsoft.JSON) before incorporating it.

But yes I REALLY wanted to have a nice JSON editor. At the very least, I wanted syntax highlighting, but I had trouble finding anything I could incorporate.

Anyone have any suggestions?

epheterson commented 8 years ago

Perhaps grab some code from this project?

http://sourceforge.net/projects/jedit/

or

https://github.com/atom/atom

epheterson commented 8 years ago

Or build in a web view?

https://highlightjs.org

KraigM commented 8 years ago

I was trying to avoid using a web view. Hybrid apps make me twitch and I didn't want to have to write all the back and forth :smile:. I ended up finding a native control that supported all kinds of functionality (syntax highlighting, theming, auto complete, folding...) but when I started trying to use it I figured out what they did... they just wrapped a web view :disappointed:. But it works and they already did the annoying parts, so I'm going with that... for now.

Will be in the next release (0.3.0).

KraigM commented 8 years ago

Atom.io might be a good ref point for when we try to get HomeBridge Controller to install/manage HomeBridge (install, restart, etc). Good find!