mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
fix issue #1747
This commit is contained in:
@ -26,7 +26,9 @@ func (j *Json) UnmarshalJSON(b []byte) error {
|
||||
|
||||
// UnmarshalValue is an interface implement which sets any type of value for Json.
|
||||
func (j *Json) UnmarshalValue(value interface{}) error {
|
||||
if r := New(value); r != nil {
|
||||
if r := NewWithOptions(value, Options{
|
||||
StrNumber: true,
|
||||
}); r != nil {
|
||||
// Value copy.
|
||||
*j = *r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user