title: C# serialize DynamoDB item to JSON
body: <p>In my C# lambda I retrieve an item from DynamoDB. It is returned as a <code>Dictionary&lt;string, AttributeValue&gt;</code>. Is there a good way to serialize that to JSON?</p>
  
  <p>The AttributeValue class exposes a bunch of properties to retrieve values of different types. If you do a simple serialization each one of those properties shows up in the JSON, most of them null, and makes a really messy object.</p>
  
  <p>I want it to recognize a map and turn it into a JSON object, recognize a list and turn it into a JSON list. Basically, I want the object the Item represents.</p>