Re:gRPC-Web: Moving past REST+JSON towards type-safe Web APIs
by andrewingram on Thursday April 27, 2017 @08:27AM
(#14210927)
so everything is optional?
[ Parent
| on HN ]
Re:gRPC-Web: Moving past REST+JSON towards type-safe Web APIs
by euyyn on Thursday April 27, 2017 @01:09PM
(#14213082)
Except primitive types. So this is avoided:
> You'll just end up with structures where everything is a Maybe type, so you end up needing tons of bespoke client-side code to handle the possible permutations.
Absent primitive values default to zero, while absent message fields are mapped to what makes most sense in the specific programming language (in most of them, "null" or "nil").
Re:gRPC-Web: Moving past REST+JSON towards type-safe Web APIs
by beastman82 on Thursday April 27, 2017 @08:43AM
(#14210991)
yes