1

In my app I'm trying to extract some values from the local database and put them into JSONObjects and put those JSONObjects inside a JSONArray and synchronise with the server. But it's not getting synchronised. I'm suspecting it's because the following reason.

When I'm getting the item_no from the local database, it comes as TR/KU/ROT36. But after I use jsonObj.put("item_no", myItemObj.getItemNo())to put that value inside the JSONObject, it's stored as TR\/KU\/ROT36

I admit I'm not sure this is the reason the data is not getting synchronised with the server correctly. I'm trying to tick along the potential issues to try and get my app to work. Would this cause as issue in the server side? How do I fix this?

Thahzan
  • 975
  • 2
  • 9
  • 23
  • 1
    `\/` is just a way of escaping the `/`: http://stackoverflow.com/questions/1580647/json-why-are-forward-slashes-escaped – Flash Jun 04 '14 at 13:39
  • 1
    The string is being escaped by `JSONObject`: [A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A character is represented as a single character string. A string is very much like a C or Java string.](http://www.json.org), so If there's an issue, is in the "save" on your server – Sergi Juanola Jun 04 '14 at 13:40
  • Thanks for the quick response guys. You learn something new everyday. – Thahzan Jun 04 '14 at 14:20

0 Answers0