0

I have following type of token that as to be send as it is in request.

//token contains following value token = "ABCD/saljljlkljljljl";

class Token{ public String token;

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }


}

when I try to convert it to string using object mapper class, it converts it as follows. ObjectMapper mapper = new ObjectMapper(); mapper.writeValueAsString(token)

{"token":"ABCD\/saljljlkljljljl"}

Note one more '\' added in front of '/' due to which my calls are failing.Don't no why its not reflecting even in stackoverflow reader pane also.

Please help out on this.

developer
  • 401
  • 1
  • 4
  • 15

0 Answers0