Uses of Class
com.google.protobuf.util.JsonFormat.Printer
Packages that use JsonFormat.Printer
-
Uses of JsonFormat.Printer in com.google.protobuf.util
Methods in com.google.protobuf.util that return JsonFormat.PrinterModifier and TypeMethodDescriptionJsonFormat.Printer.alwaysPrintFieldsWithNoPresence()
Creates a newJsonFormat.Printer
that will print any field that does not support presence even if it would not otherwise be printed (empty repeated fields, empty map fields, and implicit presence scalars set to their default value).JsonFormat.Printer.includingDefaultValueFields()
Deprecated.This method is deprecated, and slated for removal in the next Java breaking change (5.x).JsonFormat.Printer.includingDefaultValueFields
(Set<Descriptors.FieldDescriptor> fieldsToAlwaysOutput) Creates a newJsonFormat.Printer
that will also print default-valued fields if their FieldDescriptors are found in the supplied set.JsonFormat.Printer.omittingInsignificantWhitespace()
Create a newJsonFormat.Printer
that omits insignificant whitespace in the JSON output.JsonFormat.Printer.preservingProtoFieldNames()
Creates a newJsonFormat.Printer
that is configured to use the original proto field names as defined in the .proto file rather than converting them to lowerCamelCase.static JsonFormat.Printer
JsonFormat.printer()
Creates aJsonFormat.Printer
with default configurations.JsonFormat.Printer.printingEnumsAsInts()
Creates a newJsonFormat.Printer
that prints enum field values as integers instead of as string.JsonFormat.Printer.sortingMapKeys()
Create a newJsonFormat.Printer
that will sort the map keys in the JSON output.JsonFormat.Printer.usingTypeRegistry
(TypeRegistry registry) Creates a newJsonFormat.Printer
using the given registry.JsonFormat.Printer.usingTypeRegistry
(JsonFormat.TypeRegistry oldRegistry) Creates a newJsonFormat.Printer
using the given registry.