code: def MessageToJson(message,
                    including_default_value_fields=False,
                    preserving_proto_field_name=False):
    
    printer = _Printer(including_default_value_fields,
                       preserving_proto_field_name)
    return printer.ToJsonString(message)
docs: Converts protobuf message to JSON format.
  
    Args:
      message: The protocol buffers message instance to serialize.
      including_default_value_fields: If True, singular primitive fields,
          repeated fields, and map fields will always be serialized.  If
          False, only serialize non-empty fields.  Singular message fields
          and oneof fields are not affected by this option.
      preserving_proto_field_name: If True, use the original proto field
          names as defined in the .proto file. If False, convert the field
          names to lowerCamelCase.
  
    Returns:
      A string containing the JSON formatted protocol buffer message.