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
In our project, we almost use encoding/json.Marshal/Unmarshal to operate easyjson struct, sometime the following issue always happens when we marshal easyjson struct of message.NotificationMessage with json.Marshal:
json: error calling MarshalJSON for type message.NotificationMessage: invalid character '+' looking for beginning of value
It looks like decoding json error occurred from MarshalJSON function which is generated by easyjson, but it is weird since there is no any code to decode json inside original message.NotificationMessage struct. We doubt it is easyjson issue when we operate them as Marshaler interface by encoding/json, how about your idea about it.
BTW which way is the most recommendation for using easyjson?
Directly using easyjson struct's MarshalJSON/UnmarshalJSON which are generated by easyjson.
Using easyjson.Marshal/Unmarshal to operate easyjson struct as what are demonstrated in README.md.
The text was updated successfully, but these errors were encountered:
In our project, we almost use encoding/json.Marshal/Unmarshal to operate easyjson struct, sometime the following issue always happens when we marshal easyjson struct of message.NotificationMessage with json.Marshal:
json: error calling MarshalJSON for type message.NotificationMessage: invalid character '+' looking for beginning of value
It looks like decoding json error occurred from MarshalJSON function which is generated by easyjson, but it is weird since there is no any code to decode json inside original message.NotificationMessage struct. We doubt it is easyjson issue when we operate them as Marshaler interface by encoding/json, how about your idea about it.
BTW which way is the most recommendation for using easyjson?
The text was updated successfully, but these errors were encountered: