JSONException: Value of type java.lang.String cannot be converted to JSONObject

前端 未结 14 2403
别那么骄傲
别那么骄傲 2020-11-22 07:10

I have a JSON file with 2 JSON-Arrays in it: One Array for routes and one Array for sights.

A route should consist of several sights where the user gets navigated to

14条回答
  •  借酒劲吻你
    2020-11-22 07:54

    In my case the problem occured from php file. It gave unwanted characters.That is why a json parsing problem occured.

    Then I paste my php code in Notepad++ and select Encode in utf-8 without BOM from Encoding tab and running this code-

    My problem gone away.

提交回复
热议问题