title: override default encoders for jsonable_encoder in FastAPI
body: <p>I have code that looks something like this using <a href="https://fastapi.tiangolo.com/" rel="noreferrer">Fast API</a>:</p>
  
  <pre><code>class EnumTestT(Enum):
      test_t_value = 0
  
  object = { 
      test: test_t_value
  }
  
  enum_mapping = {
      test_t_value: "Test"
  }
  
  def enum_encoder(val: EnumTestT) -&gt; str:
      return enum_mapping[val]
  
  custom_encoder = {
      EnumTestT: enum_encoder
  }
  
  @app.get("/test")
  async def test_get():
      return jsonable_encoder(object, custom_encoder=custom_encoder)
  </code></pre>
  
  <p>The issue is that <code>jsonable_encoder</code> applies custom encoders after the defaults.  Is there any way to apply them before the default encoders.  Because for an <code>Enum</code> and any derived classes the value of the enum is reported instead of the mapped value.</p>