Provide serialization and de-serialization of different formats based on Google’s protobuf Message. Enables overriding the default (byte array) output to text based formats such as XML, JSON and HTML.
BSD 3-Clause "New" or "Revised" License
153
stars
97
forks
source link
Support for havig attributes in XML formatter? #61
Hello,
Thank you for the great work. I would like to know if there is (or will be) any support for having attributes in XML elements, instead of having separate XML entities for each message field.
Hello, Thank you for the great work. I would like to know if there is (or will be) any support for having attributes in XML elements, instead of having separate XML entities for each message field.
Example: I have the following .proto file:
When I use
new XmlFormat().printToString(addressBook)
, the output string looks like this:However, I would like to have the possibility to have some of the fields as attributes:
The second one is arguably more readable and more concise. So, is there (or will there be) any support for it in this library? Thanks!