protobuf
protobuf copied to clipboard
when Unmarshal a slice field, json str is '[]' or empty, the value is always nil.
when Unmarshal a slice field, json str is '[]' or empty, the value is always nil. i want to distinguish ,how can i do
Protobuf repeated fields don't have a concept of presence, so there is no distinction between a zero-length repeated field and an unset repeated field. I'm afraid there is no way for you to distinguish between these cases after unmarshaling.
ok.thanks. There is such the scene. if you can give other suggests, i will be thankful.
ok.thanks. There is such the scene. if you can give other suggests, i will be thankful.
homelight/json This repo can help.