How can I format a Google Protocol buffer object in XML and parse XML

I am going to transfer GPB objects by cable, but in a local application I need to save them locally in XML (the client requires XML, without editing, do not ask me why), so the client can edit XML (which brings me to another part of my question - GPB parsing from XML). Does anyone know of a structure that does this? I need this C ++ code on Windows.

+4
source share
1 answer

On this, as far as I know, there is no C ++ implementation. You can port this code from Java http://code.google.com/p/protostuff/ if you want, we can port it, I also need the same thing as you!

One of the problems is that pb do not describe themselves on their own, so you need a whole circuit that is not perfect.

The documentary information about reflections that Google uses inside is a bit confusing for me. http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html#Message .

Also see here. Show all items in a protocol buffer message.

+1
source

Source: https://habr.com/ru/post/1393125/


All Articles