title: How to return string to json format
body: <pre><code>@CrossOrigin(origins = "*", allowedHeaders = "*")
  @RequestMapping(value = Constants.REQ_MAP_LOGIN, method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
  public String vendorloginMethodPost(@RequestBody VendorLogin vendoridlogin) {
  
      System.out.println(vendoridlogin);
      String message = Constants.EMPTY_STRING;
      String id = dao.getLoginDetails(vendoridlogin);
  
  
      if (id == null) {
          message = "login fail";
      } else {
          message = " login Successfully";
      }
  
      return message;
  }
  </code></pre>
  
  <p>How to return response string to json format
  how to convert?
  In the above, Spring would add "Login sussess or fail " into the response body. 
  How can I return a String as a JSON response? I  dont understand that I could add quotes.
  Please provide any examples to help explain this concept.</p>