You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have no idea, but it wouldn't be that hard to implemented for this module as our internal configuration parser just saves it to a object so we could just read/save JSON structures if needed. cc @Swaagie
Activity
3rd-Eden commentedon May 16, 2015
I have no idea, but it wouldn't be that hard to implemented for this module as our internal configuration parser just saves it to a object so we could just read/save JSON structures if needed. cc @Swaagie
cadorn commentedon May 17, 2015
Does it handle full haproxy config syntax parsing and generation to and from JSON already?
Swaagie commentedon May 17, 2015
Been a while since I worked on this, it already reads from JSON it seems, but that is pretty easy of course https://github.com/observing/haproxy/blob/master/lib/parser.js#L20-L29. That said it keeps track of all values through an object like @3rd-Eden said, so a
stringifyof the internal representation should be enough. However it will result in a loss of comments as those are not supported by JSON, https://github.com/observing/haproxy/blob/master/lib/parser.js#L64-L66