mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
Merge pull request #1749 from qinyuguang/gjson_unmarshalvalue
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