oday
11/25/2019, 11:55 AMspand
11/25/2019, 11:56 AModay
11/25/2019, 11:56 AMbjartek
11/25/2019, 12:04 PMUbi
11/25/2019, 12:09 PM.trim()
the string before encoding to test. (Note! trim only if you really want to remove empty spaces or \n
at the end of your string)oday
11/25/2019, 12:14 PM"{\n" +
"\"userId\":\"${fireAuth.currentUser?.uid}\",\n" +
"\"carId\":\"${carDetails.id}\",\n" +
"\"car\":\"${carDetails.make} ${carDetails.model} ${carDetails.submodel} ${carDetails.year}\",\n" +
"\"sellerPhone\":\"+971504421995\",\n" +
"\"buyerEmail":"${fireAuth.currentUser?.email}\"" +
"\n}"
now its like this
"{" +
"\"userId\":\"${fireAuth.currentUser?.uid}\"," +
"\"carId\":\"${carDetails.id}\"," +
"\"car\":\"${carDetails.make} ${carDetails.model} ${carDetails.submodel} ${carDetails.year}\"," +
"\"sellerPhone\":\"+971504421995\"," +
"\"buyerEmail":"${fireAuth.currentUser?.email}\"" +
"}"
produces the correct encoding result