ETExamTower
Q7Using APIsMultiple answers

Which two data-encoding techniques does gRPC support? *(Choose two.)*

Select 2 answers.
← → navigate · a answer
Community votes
B
50% (5)
D
50% (5)
A
0% (0)
C
0% (0)
E
0% (0)
Discussion · 10
15
JSON and ProtoBuf
6
By default, gRPC uses Protocol Buffers, Google’s mature open source mechanism for serializing structured data, though it can also be used with other data formats like JSON.
3
I agree with answers B. JSON & D. ProtoBuf
3
JSON and ProtoBuf (B and D) Explanation: gRPC is an open-source RPC framework. It is built on Protocol Buffers (Protobuf), which is an open source binary serialization protocol. gRPC gives a flexible, efficient, automated way to serialize structured data, like XML, but smaller and simpler to use. You define the structure with protocol buffer message types in .proto files. Each protocol buffer message is a small logical record of information, containing a series of name-value pairs. Cisco gRPC IDL uses the protocol buffers interface definition language (IDL) to define service methods, and define parameters and return types as protocol buffer message types. The gRPC requests are encoded and sent to the router using JSON. Clients can invoke the RPC calls defined in the IDL to program the router.
B, D 3
Selected Answer: BD https://grpclib.readthedocs.io/en/latest/encoding.html
B, D 2
Selected Answer: BD "So by default gRPC uses Protocol Buffers as encoding format." ... "This format can’t be changed, so content type should always be in the form of application/grpc+{subtype}, where {subtype} can be anything you want, e.g. proto, fbs, json, thrift, bson, msgpack." https://grpclib.readthedocs.io/en/latest/encoding.html
1
B & D By default, gRPC treats the application/grpc content type as application/grpc+proto content type. So by default gRPC uses Protocol Buffers as the encoding format. But why does the content type have a proto subtype like that? This is because messages in gRPC are sent as a length-delimited stream of binary blobs. This format can’t be changed, so the content type should always be in the form of application/grpc+{subtype}, where {subtype} can be anything you want, e.g. proto, fbs, json, thrift, bson, msgpack.
1
Jerryyang is correct. https://grpclib.readthedocs.io/en/latest/encoding.html
B, D 1
Selected Answer: BD B and D
B, D 1
Selected Answer: BD gRPC supports the following two data encoding techniques from your options: B. JSON D. ProtoBuf Explanation: gRPC, by default, uses Protocol Buffers (ProtoBuf), Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data, as its interface definition language (IDL). This is the recommended serialization format for gRPC. As for JSON, while gRPC does not natively support it, it can be used as a serialization format in gRPC with certain workarounds.