增加 Transition 方法

This commit is contained in:
白茶清欢 2023-12-29 18:26:59 +08:00
parent 01f39b6ea0
commit c5395eec5e

View File

@ -114,6 +114,15 @@ func (oj *ownJSON) MarshalForString(input interface{}) string {
return string(oj.MarshalForByte(input)) return string(oj.MarshalForByte(input))
} }
// Transition 数据结构转换 map/slice/struct => struct | struct => map/slice/struct
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 18:25 2023/12/29
func (oj *ownJSON) Transition(input interface{}, receiver interface{}) error {
return oj.UnmarshalWithNumber(oj.MarshalForByte(input), receiver)
}
// ConsoleOutput ... // ConsoleOutput ...
// //
// Author : go_developer@163.com<白茶清欢> // Author : go_developer@163.com<白茶清欢>