java - Re-format unreadable JSON to readable JSON on android -
how can re-format such response. need escape \t , \n. have tried reformat replacing "" won't work. valid json response api. have used jsontokener
none worked.
"\n \t{\n\t\t\t \"id\": \"567ditr\",\n\t\t\t\t\"url\": \"http://test.com/visa/wallet/debit-auth/code?autcode=yueyuw77676&ref_id=0909343ssdsds&lang=eng\", \n\t\t\t\t\"code\": \"oi08989pk3mkpitxn\",\n\t\t\t\t\"created_at\": \"mon, 02 feb 2015 14:07:08 utc\"\n\t\t\t}\n "
i need this:
{ "id":"23", "dept":"ict" }
jsonstr = jsonstr.replace("\\\\n", jsonstr); jsonstr = jsonstr.replace("\\\\t", jsonstr); jsonstr = jsonstr.replaceall("\\\\", "");
try this
Comments
Post a Comment