diff options
| author | Russ Cox <rsc@golang.org> | 2009-11-01 05:49:07 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-11-01 05:49:07 -0800 |
| commit | 902b8d96cca611cc0e3799676087475763c6fdb3 (patch) | |
| tree | 4c0f2c9a0515d5eaf4378f9401c3841201147598 /src/pkg/json/parse.go | |
| parent | cbad9415517b50f679ef945478633e504c0292e3 (diff) | |
| download | golang-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.go | 4 |
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; } |
