protobuf-java-format icon indicating copy to clipboard operation
protobuf-java-format copied to clipboard

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.

Results 24 protobuf-java-format issues
Sort by recently updated
recently updated
newest added

adding formatter to convert decimal exponent notation to number.. 1.234567067801245E10 to 12345670678.0124 refer XmlFormatTest.java for usage.

format/xml

I'm getting errors when informing special characteres like '//' (char generated from encoded base64 file) at a proto `bytes` field. protos ```proto message InformaContestacaoCliente { required Contestacao contestacao = 1;...

When the XML content contains special characters like URL the formatter fails to merge. Is there a work around for this ? XmlFormat xmlBinder = new XmlFormat(); xmlBinder.setDefaultCharset(StandardCharsets.UTF_8); InputStream data...

Get error on line no. 235 saying symbol not found. I've been using 1.7 I had to remove the usage of toUnsignedLong and unsignedLong again on 240 to make it...

In order to reduce the size of json payload, it should be better to send only the enum number instead of the value name.

Google is using base64 encoding to convert raw bytes to JSON string https://developers.google.com/protocol-buffers/docs/proto3#json with Proto3. It would be nice if protobuf-java-format does the same

enhancement

I'm using this with proto3 syntax, and it's working well (thanks for all the work you've put into it). With proto3, they've introduced a [canonical encoding into JSON](https://developers.google.com/protocol-buffers/docs/proto3#json). Do you...

enhancement

Implementation of JsonFormat.printToString() (which is in ProtobufFormatter.java) is to print to a byte array using the Charset specified by JsonFormat.setDefaultCharset(), but converts the byte array back to a string using...

If I have a protobuf message with unknown fields: ``` leaf1: "Hello" leaf2: 23 leaf3: 41 4: "world" ``` where leaf1, leaf2, and leaf3 are my known fields, and 4...

Escaping a ByteString (JavaFormat.escapeBytes(...)) produces a String that does not always get unescaped back to an equivalent of the original ByteString via JavaFormat.unescapeBytes(...). See pull request #27 for a test...