Interface GrpcJsonTranscoder.PrintOptionsOrBuilder

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean getAddWhitespace()
      Whether to add spaces, line breaks and indentation to make the JSON output easy to read.
      boolean getAlwaysPrintEnumsAsInts()
      Whether to always print enums as ints.
      boolean getAlwaysPrintPrimitiveFields()
      Whether to always print primitive fields.
      boolean getPreserveProtoFieldNames()
      Whether to preserve proto field names.
      • Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

        isInitialized
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • getAddWhitespace

        boolean getAddWhitespace()
         Whether to add spaces, line breaks and indentation to make the JSON
         output easy to read. Defaults to false.
         
        bool add_whitespace = 1;
        Returns:
        The addWhitespace.
      • getAlwaysPrintPrimitiveFields

        boolean getAlwaysPrintPrimitiveFields()
         Whether to always print primitive fields. By default primitive
         fields with default values will be omitted in JSON output. For
         example, an int32 field set to 0 will be omitted. Setting this flag to
         true will override the default behavior and print primitive fields
         regardless of their values. Defaults to false.
         
        bool always_print_primitive_fields = 2;
        Returns:
        The alwaysPrintPrimitiveFields.
      • getAlwaysPrintEnumsAsInts

        boolean getAlwaysPrintEnumsAsInts()
         Whether to always print enums as ints. By default they are rendered
         as strings. Defaults to false.
         
        bool always_print_enums_as_ints = 3;
        Returns:
        The alwaysPrintEnumsAsInts.
      • getPreserveProtoFieldNames

        boolean getPreserveProtoFieldNames()
         Whether to preserve proto field names. By default protobuf will
         generate JSON field names using the ``json_name`` option, or lower camel case,
         in that order. Setting this flag will preserve the original field names. Defaults to false.
         
        bool preserve_proto_field_names = 4;
        Returns:
        The preserveProtoFieldNames.