2017年6月30日 星期五

org.json.JSONException: Value <feed of type java.lang.String cannot be converted to JSONArray

This error is reported by android studio. It is caused by wrong format of data, which means that the link don't provide Json or the Json format is incorrect or you parse the correct Json in wrong way!




solution:
1. check if your link links to Json page, just paste your link to the browser to see if the Json appears to be downloded or on the wed page
2. check the Json is correct or not, correct means syntax correct, you can check it in Json formatter online
3. realize the difference between Json object and Json array, Json array use [ ] , while Json object use {}





1 則留言:

  1. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good work. We can also be helpful in developing your site, as our site provides the best web development tools. تحويل الصور الى pdf

    回覆刪除