Skip to content

ProtoFile.service.method.options contain 3 unknown bytes #202

Answered by garyp
Maaaaaaaa12138 asked this question in Q&A
Discussion options

You must be logged in to vote

Can you please share the definition of the (pb_idl.api_method).serializer field and the extend google.protobuf.MethodOptions definition you're using?

I'm assuming that pb_idl.api_method is defined as a protobuf message and serializer is defined as a string field within that message. In which case, the byte values are probably:

[0] = 6  // length in bytes of the `pb_idl.api_method` message that follows 
[1] = 26 // field number and wire type of the `serializer` field
[2] = 4  // length in bytes of the string "json" that follows
[3] = 106  // "j"
[4] = 115  // "s"
[5] = 111  // "o"
[6] = 110  // "n"

You can see an explanation at https://developers.google.com/protocol-buffers/docs/encoding#…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Maaaaaaaa12138
Comment options

@garyp
Comment options

Answer selected by Maaaaaaaa12138
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #201 on December 22, 2021 05:23.