I am developing a Android application which communicates with a PHP server via JSON.
In my application, I am encoding a key to JSON to send to server. But after encoding,when I debug the key in logcat, it showing a new line character at the end of value:
The logcat showing me something like that:
{"accessKey":"123456789
"}
Because of this,PHP server won't accept the JSON values.
Is there any method or suggestions to remove new line character? I already have googled this, but can't find any satisfactory solution.