void print(MessageOrBuilder message) throws IOException { WellKnownTypePrinter specialPrinter = wellKnownTypePrinters.get(message.getDescriptorForType().getFullName()); if (specialPrinter != null) { specialPrinter.print(this, message); return; } print(message, null); }
print((Message) value); break;
} else { print(contentMessage, typeUrl);
/** * Converts a protobuf message to JSON format. * * @throws InvalidProtocolBufferException if the message contains Any types that can't be * resolved. * @throws IOException if writing to the output fails. */ public void appendTo(MessageOrBuilder message, Appendable output) throws IOException { // TODO(xiaofeng): Investigate the allocation overhead and optimize for // mobile. new PrinterImpl( registry, alwaysOutputDefaultValueFields, includingDefaultValueFields, preservingProtoFieldNames, output, omittingInsignificantWhitespace, printingEnumsAsInts) .print(message); }