title: Return JSON with key-value pair
body: <p>I use this code to generate response from REST endpoint:</p>
  
  <pre><code>if (result.hasErrors()) {
              List&lt;String&gt; errorsList = new ArrayList&lt;&gt;();
              List&lt;FieldError&gt; errors = result.getFieldErrors();
              for (FieldError error : errors ) {
                  System.out.println("Validation error in field: " + error.getObjectName() 
                                 + "! Validation error message: " + error.getDefaultMessage() 
                                 + "! Rejected value:" + error.getRejectedValue());
                  errorsList.add(error.getField() + ": " + error.getDefaultMessage());
              }
  
              return ResponseEntity.ok(new StringResponseDTO(errorsList));
          }
  </code></pre>
  
  <p>Object:</p>
  
  <pre><code>@JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME)
  @JsonTypeName("response")
  public class StringResponseDTO {
  
      private String redirect;
  
      private List&lt;String&gt; errors;
  
      public StringResponseDTO(String redirect) {
          super();
          this.redirect = redirect;
      }
  
      public StringResponseDTO(List&lt;String&gt; errors) {
          this.errors = errors;
      }
  
      ......
  }
  </code></pre>
  
  <p>Now I get this response:</p>
  
  <pre><code>{
    "response" : {
      "errors" : [ "expiration_year: must not be null", "default_transaction_type: must not be null"]
    }
  }
  </code></pre>
  
  <p>I need to change it like this:</p>
  
  <pre><code>{
        "response" : {
          "errors" : [ "expiration_year": "must not be null", "default_transaction_type": "must not be null"]
        }
      }
  </code></pre>
  
  <p>Is there someway to archive his without added a lot of "" symbols?</p>