[#110] fix json dumper
This commit is contained in:
		
							parent
							
								
									db09dd443f
								
							
						
					
					
						commit
						eb3114b7c5
					
				| @ -120,6 +120,9 @@ func (d *JsonDumper) EnterNode(w walker.Walkable) bool { | ||||
| // LeaveNode is invoked after node process | ||||
| func (d *JsonDumper) LeaveNode(n walker.Walkable) { | ||||
| 	fmt.Fprint(d.Writer, "}") | ||||
| 
 | ||||
| 	d.isNotFirstNode = true | ||||
| 	d.isChildNode = false | ||||
| } | ||||
| 
 | ||||
| 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") | ||||
| 	d.printIndent(d.Writer) | ||||
| 	fmt.Fprint(d.Writer, "}") | ||||
| 
 | ||||
| 	d.isNotFirstNode = true | ||||
| 	d.isChildNode = false | ||||
| } | ||||
| 
 | ||||
| func (d *PrettyJsonDumper) EnterChildNode(key string, w walker.Walkable) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user