You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was using the method gjson.Valid(str), I found that if str is a string of pure numbers, for example, str := "123123123", the return result of this method is also true.
The text was updated successfully, but these errors were encountered:
"123" is valid because JSON accepts it as {"age": 123}. gjson.Valid removes the quotation marks. However, "adam" is not valid because JSON does not accept something like {"name": adam}; It should be wrapped with quotation marks like: "\"adam\"" to become valid.
examples:
123, is valid as number
null, is valid as null
"hello", valid as string
"123" valid as string
true, valid as boolean
false, vald
"true" valid as string
"false" valid as string
When I was using the method gjson.Valid(str), I found that if str is a string of pure numbers, for example, str := "123123123", the return result of this method is also true.
The text was updated successfully, but these errors were encountered: