Spring returns a modified JSONObject with @ResponseBody
<p>I'm using Spring MVC and trying to return a <strong>JSONObject</strong> as response from my Controller. I have annotated the method with <strong>@ResponseBody</strong> so that it puts the <strong>JSONObject</strong> returned by my controller into the <strong>ResponseBody</strong>.
Here's my Controller:</p>

<pre><code>@GetMapping(value="/student/{roll}",produces="application/json")
@ResponseBody
private JSONObject getStudentDetails(@PathVariable(value="roll") String roll) {
    JSONObject response = new JSONObject();
    Student student = studentDAO.getStudent(roll);
    response.put("firstName",student.getFirstName());
    response.put("lastName",student.getLastName());
    response.put("roll",student.getRoll());
    response.put("email",student.getEmail());
    response.put("course",student.getCourse());
    response.put("stream",student.getStream());
    response.put("year",student.getYear());
    response.put("gender",student.getGender());
    String date = null;
    DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    try {
        date = String.valueOf(df.parse(student.getSignUpDate()).getTime());
    } catch (ParseException e) {
        e.printStackTrace();
    }
    response.put("signUpDate", date);
    System.out.println("Response Body::::: "+response.toString());
    return response;
}
</code></pre>

<p>A valid response should be like this:</p>

<pre><code>{
  "firstName": "John",
  "lastName": "Doe",
  "gender": "M",
  "stream": "cse",
  "year": 3,
  "roll": "2013BT2011",
  "course": "btech",
  "signUpDate": "1476224877000",
  "email": "john@doe.com"
}
</code></pre>

<p>But I am getting this:</p>

<pre><code>{
  "map": {
    "firstName": "John",
    "lastName": "Doe",
    "gender": "M",
    "stream": "cse",
    "year": 3,
    "roll": "2013BT2011",
    "course": "btech",
    "signUpDate": "1476224877000",
    "email": "john@doe.com"
  }
}
</code></pre>

<p>Here, the object returned by my controller is wrapped into a <strong>map</strong> object and then returned by Spring.</p>

<p>Could someone tell me what is wrong here.
Any help would be appreciated. :)</p>