• Latest Code...

    Error parsing data org.json.JSONException: Expected ':' after n in Android or Android Studio

    Last time, i got error when trying to parse a JSONObject , then i have found simple mistake during parsing.

    It's because i append an "n" at the end of each line here:

            while((line = reader.readLine()) != null) {
                sb.append(line + "n");
            }

    then I change to a newline character "\n":

        while((line = reader.readLine()) != null) {
            sb.append(line + "\n");
        }

    finally, I solve the problem, hope this may helpful.

    Happy Coding !!!

    Circle

    Most recent Elastic Search tutorials for beginner, intermediate and advance level developer, Yubraj Pokharel, in CodingWorkspace