Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/json: invalid use of ,string struct tag, trying to unmarshal "" into int #26800
some time, them submit json data like this:
or them submit form data like this demo=""
the go code:
zero value of string is "". so, in my opinion, received a zero value of string convert to json. must not get a error.
@hhniao if your values are supposed to be numbers then it should obviously be
It's a valid string yes but not a valid number. What if it's