feat: add func
This commit is contained in:
5
json.go
5
json.go
@@ -78,6 +78,11 @@ func (oj *ownJSON) UnmarshalWithNumberForIOReaderIgnoreError(ioReader io.ReadClo
|
||||
return
|
||||
}
|
||||
|
||||
// UnmarshalForString ...
|
||||
func (oj *ownJSON) UnmarshalForString(input string, receiver any) error {
|
||||
return oj.Unmarshal([]byte(input), receiver)
|
||||
}
|
||||
|
||||
// UnmarshalWithNumberForString 字符串转结构体
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
|
||||
Reference in New Issue
Block a user