Skip to content

Commit

Permalink
Fix problem with a slice around EVERY map.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukevers authored Nov 7, 2016
1 parent f74cf82 commit 90f1452
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (d *decoder) decodeInterface(name string, node ast.Node, result reflect.Val
// If we're at the root or we're directly within a slice, then we
// decode objects into map[string]interface{}, otherwise we decode
// them into lists.
if len(d.stack) == 0 || d.stack[len(d.stack)-1] == reflect.Slice {
if len(d.stack) == 0 || d.stack[len(d.stack)-1] == reflect.Map {
var temp map[string]interface{}
tempVal := reflect.ValueOf(temp)
result := reflect.MakeMap(
Expand Down

0 comments on commit 90f1452

Please sign in to comment.