Add encoding type to TypedObj.
@@ -109,6 +109,16 @@ func EncodeAny(tc TypeCodec, o interface{}) (*TypedObj, error) {
}
}
return newTypedObj(TypeDict, m), nil
+ case map[string][]interface{}:
+ m := make(map[string]*TypedObj)
+ for k, o := range obj {
+ if eo, err := EncodeAny(tc, o); err != nil {
+ return nil, err
+ } else {
+ m[k] = eo
+ }
+ }
+ return newTypedObj(TypeDict, m), nil
case map[string]int64:
m := make(map[string]*TypedObj)
for k, o := range obj {
