From 902b8d96cca611cc0e3799676087475763c6fdb3 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 1 Nov 2009 05:49:07 -0800 Subject: allow unpacking of json map into Go map, now that reflection supports it. R=r http://go/go-review/1015008 --- src/pkg/json/parse.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pkg/json/parse.go') 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; } -- cgit v1.2.3