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
+16k Golang : Get sub string example
+40.5k Golang : Convert to io.ReadSeeker type
+21.6k Golang : Encrypt and decrypt data with TripleDES
+11.5k Golang : Change date format to yyyy-mm-dd
+14.2k Elastic Search : Mapping date format and sort by date
+37.5k Upload multiple files with Go
+17k Golang : Get number of CPU cores
+5.6k PHP : Fix Call to undefined function curl_init() error
+5.4k Unix/Linux : How to archive and compress entire directory ?
+7.6k SSL : How to check if current certificate is sha1 or sha2 from command line
+10.3k Golang : How to check if a website is served via HTTPS
+8.6k Golang : Another camera capture GUI application with GTK and OpenCV