I use json.marshal api encoding a struct and then send the marshalled data to geth. It's oK to unmarshal the data locally, but geth returns a error when unmarshalling it. I don't why, please give me some advice, thanks.
When i specify this error, it returns a message "err="json: cannot unmarshal non-string into Go struct field Filterinput.ContractAddress of type common.Address". it's log15 error in geth, but i can't figure out what the log15 is used for
Best Answer
For anyone who is developing on Go version of Ethereum, and followed the error: “Normalized odd number of arguments by adding nil” to here.
It is actually an error message from
log15
. Which means you must feed even number items to the log function. For example:log.Info("some_str", item1, item2)
or:
log.Info("some_str", item1, item2, item3, item4)
Check out the source code explanation of
log15
: here