summaryrefslogtreecommitdiff
path: root/src/pkg/json/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/json/parse.go')
-rw-r--r--src/pkg/json/parse.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pkg/json/parse.go b/src/pkg/json/parse.go
index af610b5d1..ba291e940 100644
--- a/src/pkg/json/parse.go
+++ b/src/pkg/json/parse.go
@@ -296,6 +296,9 @@ type Builder interface {
// Create sub-Builders
Elem(i int) Builder;
Key(s string) Builder;
+
+ // Flush changes to parent Builder if necessary.
+ Flush();
}
func parse(lex *_Lexer, build Builder) bool {
@@ -392,6 +395,7 @@ Switch:
if ok {
lex.Next();
}
+ build.Flush();
return ok;
}