Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use type Any in pb v3? #198

Closed
AlexStocks opened this issue Feb 8, 2015 · 2 comments
Closed

how to use type Any in pb v3? #198

AlexStocks opened this issue Feb 8, 2015 · 2 comments

Comments

@AlexStocks
Copy link

Changes.txt in pb v3 says ""Removal of extensions, which are instead replaced by a new standard type called Any.". However, I do not find any examples show how to use Any. Can one of your members would be so kindy show me how to use it ?

@Gatherer
Copy link

Found this ... posted by "Feng Xiao" in "Protobuf Buffers v3.0.0-alpha-1"

Sorry, but "Any" is not added in this alpha version. In proto3, "Any" will be a pre-defined message type. Its definition looks like this:
package google.protobuf;
message Any {
  string type_url = 1;
  bytes value = 2;
}
You could define such a message yourself and use it as a temporary solution. In the next alpha version we'll provide these types and utility functions to work with an Any message.

@AlexStocks
Copy link
Author

thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants