keepalived: rewrite json generation procedure