(ctx *objectExportCtx)
| 955 | } |
| 956 | |
| 957 | func (o *baseObject) export(ctx *objectExportCtx) interface{} { |
| 958 | if v, exists := ctx.get(o.val); exists { |
| 959 | return v |
| 960 | } |
| 961 | keys := o.stringKeys(false, nil) |
| 962 | m := make(map[string]interface{}, len(keys)) |
| 963 | ctx.put(o.val, m) |
| 964 | for _, itemName := range keys { |
| 965 | itemNameStr := itemName.String() |
| 966 | v := o.val.self.getStr(itemName.string(), nil) |
| 967 | if v != nil { |
| 968 | m[itemNameStr] = exportValue(v, ctx) |
| 969 | } else { |
| 970 | m[itemNameStr] = nil |
| 971 | } |
| 972 | } |
| 973 | |
| 974 | return m |
| 975 | } |
| 976 | |
| 977 | func (o *baseObject) exportType() reflect.Type { |
| 978 | return reflectTypeMap |
nothing calls this directly
no test coverage detected