I am trying to implement Basecamp API in Android application. I am trying to rename the url from .xml
extension to .json
. It is working fine for some of the web services like peoples, Companies etc.
But when I try to get the json response of the particular company then it is giving me response in xml, though I am requesting for json.
like
String url = "https://"+ domain +"/companies/" + companyId +".json"
and also Same for
"https://" + domain + "/projects/count.json".
Also I am trying to implement for below links it is not giving me result in json(is it giving blank response) but if I change the extension from .json
to .xml
then it is working fine for me and giving me response in XML
1. "https://" + domain + "/projects/" + projectid +
"/calendar_entries/milestones.json"
2. "https://" + domain + "/todo_lists.json?responsible_party=" + id
3. "https://" + domain + "/projects/" + projectId +
"/calendar_entries.json"
4. "https://" + domain + "/projects/" + projectId +
"/categories.xml?type=post"
I am using a Rest full API for connection with Restful web service.
I don't know why I am not getting json response from the web service.
Please help me out.