In my Spring project i was added jackson 1 and now it is 2 then i have seen this difference. Previously response was cumming right with 'loginResponse' now no object name in Json .  

Old object class for loginResponse as follows :

```
public class LoginResponse {

    private String code;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

}

```

Following is my new object class for loginResponse with annotation and SerializationFeature.WRAP\_ROOT\_VALUE, false:

```
@JsonRootName(value = "loginResponse") 
public class LoginResponse {

private String code;

public String getCode() {
    return code;
}

public void setCode(String code) {
    this.code = code;
}

ObjectMapper aa= new ObjectMapper().configure(SerializationFeature.WRAP_ROOT_VALUE, false);

```

}

I want this output:

```
{
   "loginResponse":
   {
       "code": 0
   }
}

```

But it gives me the following response:

```
 {
       "page": 0
}

```

Please any one knows this. How to resolve? Please.