增加合并数据并转换能力

This commit is contained in:
白茶清欢 2024-01-10 17:08:03 +08:00
parent cb0f7b9151
commit 399e964daa

16
json.go
View File

@ -172,6 +172,22 @@ func (oj *ownJSON) MergeDataForMapIgnoreError(dataList ...interface{}) map[strin
return res return res
} }
// MergeDataForReceiver 合并数据并转换
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 17:07 2024/1/10
func (oj *ownJSON) MergeDataForReceiver(receiver interface{}, dataList ...interface{}) error {
res, err := oj.MergeDataForMap(false, dataList)
if nil != err {
return err
}
if err = oj.Transition(res, receiver); nil != err {
return err
}
return nil
}
// ConsoleOutput ... // ConsoleOutput ...
// //
// Author : go_developer@163.com<白茶清欢> // Author : go_developer@163.com<白茶清欢>