<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Justin Etighe</title>
    <description>The latest articles on DEV Community by Justin Etighe (@dystopiandev).</description>
    <link>https://dev.to/dystopiandev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F152301%2F279ed4e8-336d-4495-a07a-365d182f0ca3.jpeg</url>
      <title>DEV Community: Justin Etighe</title>
      <link>https://dev.to/dystopiandev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dystopiandev"/>
    <language>en</language>
    <item>
      <title>'optional string' in proto3 messages will not yield nullable strings in C#</title>
      <dc:creator>Justin Etighe</dc:creator>
      <pubDate>Thu, 03 Nov 2022 17:42:46 +0000</pubDate>
      <link>https://dev.to/dystopiandev/optional-string-in-proto3-messages-will-not-yield-nullable-strings-in-c-80k</link>
      <guid>https://dev.to/dystopiandev/optional-string-in-proto3-messages-will-not-yield-nullable-strings-in-c-80k</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight protobuf"&gt;&lt;code&gt;&lt;span class="na"&gt;syntax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"proto3"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"google/protobuf/wrappers.proto"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;message&lt;/span&gt; &lt;span class="nc"&gt;Sample&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// this will throw if you don't pass at least an empty string in generated C# code&lt;/span&gt;
  &lt;span class="k"&gt;optional&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="na"&gt;not_nullable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// this wrapper generates `string?` in C# (as one would expect)&lt;/span&gt;
  &lt;span class="n"&gt;google.protobuf.StringValue&lt;/span&gt; &lt;span class="na"&gt;nullable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's all. Hopefully this saves you some WTFs/minute.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>protobuf</category>
      <category>grpc</category>
    </item>
  </channel>
</rss>
