title: In FastAPI / Pydantic how can I define a return dictionary class that returns a dictionary of tuples
body: <p>I have a FastAPI request that returns a JSON like this</p>
  <pre><code>{
    &quot;1&quot;: [
      [
        &quot;HH&quot;,
        &quot;0&quot;
      ],
      [
        &quot;DD&quot;,
        &quot;0&quot;
      ]
    ]
  }
  </code></pre>
  <p>Basically, it's a dictionary with tickets numbers as a key (here &quot;1&quot;) and a list of tuples (two strings each).</p>
  <p>Is there a way to turn this structure into a Pydantic model so that I can use this with FastAPI as a response model?</p>