Golang encoding/json.UnsupportedValueError type and function example
package encoding/json
Golang encoding/json.UnsupportedValueError type and function usage example
switch err.(type) {
case *json.UnsupportedValueError:
fmt.Println("The provided JSON input is invalid")
fmt.Println("I am unable to utilize value", err.Value, err.Str) // here
default:
fmt.Println(err)
}
Reference :
Advertisement
Something interesting
Tutorials
+14.9k Golang : How to check for empty array string or string?
+13.4k Golang : Generate Code128 barcode
+31.7k Golang : How to convert(cast) string to IP address?
+20.6k Golang : Secure(TLS) connection between server and client
+6.8k Swift : substringWithRange() function example
+6.3k Golang : Test input string for unicode example
+12.6k Golang : flag provided but not defined error
+19.2k Golang : Delete item from slice based on index/key position
+3.6k Java : Get FX sentiment from website example
+14.2k Golang : Chunk split or divide a string into smaller chunk example
+30.9k Golang : Interpolating or substituting variables in string examples
+19.4k Golang : How to count the number of repeated characters in a string?