summaryrefslogtreecommitdiff
path: root/src/pkg/json/parse.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-01 05:49:07 -0800
committerRuss Cox <rsc@golang.org>2009-11-01 05:49:07 -0800
commit902b8d96cca611cc0e3799676087475763c6fdb3 (patch)
tree4c0f2c9a0515d5eaf4378f9401c3841201147598 /src/pkg/json/parse.go
parentcbad9415517b50f679ef945478633e504c0292e3 (diff)
downloadgolang-902b8d96cca611cc0e3799676087475763c6fdb3.tar.gz
allow unpacking of json map into Go map,
now that reflection supports it. R=r http://go/go-review/1015008
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;
}