Skip to content

Commit

Permalink
fix issue #1747
Browse files Browse the repository at this point in the history
  • Loading branch information
qinyuguang778 committed Apr 11, 2022
1 parent 55e0262 commit e50d8cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion encoding/gjson/gjson_implements.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ 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{
Type: ContentTypeJson,
StrNumber: true,
}); r != nil {
// Value copy.
*j = *r
}
Expand Down

0 comments on commit e50d8cb

Please sign in to comment.