You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-15 22:50:24 +02:00
#16 fix slice of map
This commit is contained in:
@ -20,6 +20,9 @@ func encoderOfSlice(typ reflect.Type) (Encoder, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if typ.Elem().Kind() == reflect.Map {
|
||||
encoder = &optionalEncoder{typ.Elem(), encoder}
|
||||
}
|
||||
return &sliceEncoder{typ, typ.Elem(), encoder}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user