<?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: sarritesh</title>
    <description>The latest articles on DEV Community by sarritesh (@sarritesh).</description>
    <link>https://dev.to/sarritesh</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%2F836148%2F01a2e6df-d0fe-432b-a434-91b073a1bbe0.png</url>
      <title>DEV Community: sarritesh</title>
      <link>https://dev.to/sarritesh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sarritesh"/>
    <language>en</language>
    <item>
      <title>Reading key and value from a map field in protobuf message using c++ API call</title>
      <dc:creator>sarritesh</dc:creator>
      <pubDate>Thu, 24 Mar 2022 14:15:17 +0000</pubDate>
      <link>https://dev.to/sarritesh/reading-key-and-value-from-a-map-field-in-protobuf-message-using-c-api-call-34ib</link>
      <guid>https://dev.to/sarritesh/reading-key-and-value-from-a-map-field-in-protobuf-message-using-c-api-call-34ib</guid>
      <description>&lt;p&gt;I have a proto3 file. There is a message in the proto file that contains a map field.&lt;/p&gt;

&lt;p&gt;proto3&lt;br&gt;
package abc.xyz.testproto&lt;br&gt;
message abc&lt;br&gt;
{&lt;br&gt;
    map  mapfield = 1;&lt;br&gt;
}&lt;br&gt;
Suppose as a c++ consumer i want to read this map field, what would be the api call necessary for me to read these key and value from this map field into a string and int field in c++ ?&lt;/p&gt;

&lt;p&gt;I tried to look for it here : &lt;a href="https://developers.google.com/protocol-buffers/docs/reference/cpp-generated#map-fields"&gt;https://developers.google.com/protocol-buffers/docs/reference/cpp-generated#map-fields&lt;/a&gt; but could not find how the code on how to consume the map fields. Can someone help me with it ?&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>protobuf</category>
      <category>proto3</category>
    </item>
  </channel>
</rss>
