I have a JSONObject:
{user:{"firstname":"testuser","surname":"æøå"}}
So i have these special characters in the object
I URLEncode the jsonString i have.
urlEncodedJsonReq = URLEncoder.encode("{user:{\"firstname\":\"testuser\",\"surname\":\"æøå\"}}","UTF-8");
I get a response from the server: “The URI you submitted has disallowed characters.”.
This is the encoded url: serverurl/%7Buser%3A%7B%22firstname%22%3A%22testuser%22%2C%22surname%22%3A%22%C3%A6%C3%B8%C3%A5%22%7D%7D
But what i need it to be:
%7Buser:%7B%22firstname%22:%22testuser%22%2C%22surname%22:%22%C3%A6%C3%B8%C3%A5%22%7D%7D
Is this possible in any reasonable way?
Thanks in advance
Yes, or simply: