Re:Application Load Balancers enables gRPC workloads with en...
by jeffbee on Friday October 30, 2020 @04:54PM
(#24946799)
Interesting. Protobuf specifies this last-instance-wins behavior, and it can be pretty useful. It allows you to override a field by simply appending a few bytes, without having to re-encode a whole message. JSON I guess doesn't have as much concern for efficiency as protobuf has.
So while to you and I this behavior might be expected (although I'm still not sure that overriding previous fields is more obvious than ignoring repeated fields) - some library implements thought differently, and there isn't even an agreed on standard. Arguing about this isn't purely academic, either - there have been security vulnerabilities resulting from these differences [1].
[1] - https://justi.cz/security/2017/11/14/couchdb-rce-npm.html