commit
17d7cec2fa
@ -120,6 +120,9 @@ func (d *JsonDumper) EnterNode(w walker.Walkable) bool {
|
|||||||
// LeaveNode is invoked after node process
|
// LeaveNode is invoked after node process
|
||||||
func (d *JsonDumper) LeaveNode(n walker.Walkable) {
|
func (d *JsonDumper) LeaveNode(n walker.Walkable) {
|
||||||
fmt.Fprint(d.Writer, "}")
|
fmt.Fprint(d.Writer, "}")
|
||||||
|
|
||||||
|
d.isNotFirstNode = true
|
||||||
|
d.isChildNode = false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *JsonDumper) EnterChildNode(key string, w walker.Walkable) {
|
func (d *JsonDumper) EnterChildNode(key string, w walker.Walkable) {
|
||||||
|
@ -157,6 +157,9 @@ func (d *PrettyJsonDumper) LeaveNode(n walker.Walkable) {
|
|||||||
fmt.Fprint(d.Writer, "\n")
|
fmt.Fprint(d.Writer, "\n")
|
||||||
d.printIndent(d.Writer)
|
d.printIndent(d.Writer)
|
||||||
fmt.Fprint(d.Writer, "}")
|
fmt.Fprint(d.Writer, "}")
|
||||||
|
|
||||||
|
d.isNotFirstNode = true
|
||||||
|
d.isChildNode = false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *PrettyJsonDumper) EnterChildNode(key string, w walker.Walkable) {
|
func (d *PrettyJsonDumper) EnterChildNode(key string, w walker.Walkable) {
|
||||||
|
Loading…
Reference in New Issue
Block a user