title: Properties of extended dictionary won't show in serialization
body: <p>I extended a dictionary (which is perfect data structure for translations) and added a marker telling what kind of translation will be performed. </p>
  
  <pre><code>internal class Translation : Dictionary&lt;string, string&gt;
  {
    public string Name { get; set; }
  }
  </code></pre>
  
  <p>However, when I serialize the object, I only get the key-value pairs in my output string. The name doesn't show. I wanted to use the stuff from the goodie bag from uncle Microsoft, i.e. <a href="https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-how-to#how-to-write-net-objects-to-json-serialize" rel="nofollow noreferrer"><em>System.Text.Json</em></a>, so I do the following.</p>
  
  <pre><code>string output = JsonSerializer.Serialize(source);
  </code></pre>
  
  <p>My suspicion is that I will need to implement a custom serializer but that's way too much hustle for this simple case. My experience tells me there's a neat, smooth approach bundled in the tools (one that I'm simply not aware of).</p>
  
  <p>How to do it? Alternatively, if not possible smoothly, why is it a complex matter (that I'm apparently failing to appreciate)?</p>
  
  <p>I was expecting a JSON on form below.</p>
  
  <pre><code>{
    "name": "donkey",
    "key1": "value1",
    "key2": "value2",
    "key3": "value3",
  }
  </code></pre>
  
  <p>I can resolve it by adding an item to my dictionary with <em>key</em> being <em>name</em> and <em>value</em> being <em>donkey</em>, of course. But that pragmatic solution, I prefer to save as my fall-back. At the moment I have some extra time and want to play around with the structure. Also, I can imagine that the <em>name</em> might become an <em>int</em> instead of <em>string</em> or maybe even a more complex structure to describe e.g. timestamp or something. That would totally break the contract of the dictionary (being string-to-string mapping).</p>