增加对对象的解析

This commit is contained in:
白茶清欢 2023-05-04 18:22:54 +08:00
parent 920b2c45b9
commit 214feb35f7

View File

@ -248,6 +248,15 @@ func (f *filter) getValue(dataType string, sourceValue gjson.Result, defaultValu
return nil, err
}
return result, nil
case DataTypeObject:
// object
var (
result map[string]interface{}
)
if err := util.JSON.UnmarshalWithNumber([]byte(sourceValueStr), &result); nil != err {
return nil, err
}
return result, nil
default:
return nil, errors.New(dataType + " is not support!")
}