title: Wrong 2nd argument type. Found: 'java.lang.Class<java.lang.String>', required: 'java.lang.Class<T>
body: <p>I want to create AWS Lambda for endpoint that get object from data base. What I want to do is sending id(string) as request body and then I would get object. But I have some problems with that:</p>
  
  <p>This is my lambda class:</p>
  
  <pre><code>public class GetDietLambda extends Lambda {
  
  @Override
  public ApiGatewayResponse handleRequest(Map&lt;String, Object&gt; input, Context context) {
      super.handleRequest(input, context);
      try {
          String id = RequestUtil.parseRequestBody(input, String.class);
          KitchenService kitchenService = appComponent.getKitchenService();
          Diet diet = kitchenService.getDiet(id);
          return ResponseUtil.generateResponse(HttpStatus.SC_OK, diet);
      } catch (IllegalArgumentException e) {
          return ResponseUtil.generateResponse(HttpStatus.SC_BAD_REQUEST, e.getMessage());
  
      }
  
  
  }
  }
  </code></pre>
  
  <p>In this line:</p>
  
  <pre><code>String id = RequestUtil.parseRequestBody(input, String.class);
  </code></pre>
  
  <p>I have an error:</p>
  
  <pre><code>Wrong 2nd argument type. Found: 'java.lang.Class&lt;java.lang.String&gt;', required: 'java.lang.Class&lt;T&gt;
  </code></pre>
  
  <p>And I really don't know what to do. Can someone help me?</p>