How to remove the special characters when getting the data using json in android? -


i working on android application. need data php web service. response getting php server shown below:

string response = [{id:100,category:local,count1:58,count2:86},     {id:101,category:server/local,count1:18,count2:27},     {id:102,category:server & local,count1:19,count2:28}]; 

but getting following message when trying separate data using json.

org.json.jsonexception: unterminated object @ character 

how remove special characters , data using json array?

strings should under double quotes. json not valid response. change response from

{id:100,category:local,count1:58,count2:86} 

to

{  "id":100,  "category":"local",  "count1":58,  "count2":86 } 

refer here


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -