Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8449189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:38:13+00:00 2026-06-10T10:38:13+00:00

I am trying to parse the JSON response get from the server and I

  • 0

I am trying to parse the JSON response get from the server and I am getting the error message: JSONArray cannot be converted to JSONObject.

Here Is the logcat:

08-28 18:56:08.083: W/System.err(1037): org.json.JSONException: Value [{"content":"<p class=\"bodytext\">erhalten Sie einen Überblick über die Aktivitäten der SKBF im Jahr 2011 im aktuellen Jahresbericht.<br \/><br \/><a href=\"de\/portraet\/auftrag\/#c113\" class=\"internal-link\" >SKBF Jahresbericht 2011<\/a><\/p>","pubDate":"01.06.12","category":"Allgemeine News","title":"SKBF Jahresbericht 2011","description":"Wenn Sie wissen wollen, was die SKBF macht","link":"http:\/\/www.skbf-csre.ch\/de\/news\/news-detail\/?tx_ttnews%5BbackPid%5D=2&tx_ttnews%5Btt_news%5D=80&cHash=1274043c236945bf6e592329e6742ebf"}] at 0 of type org.json.JSONArray cannot be converted to JSONObject
08-28 18:56:08.083: W/System.err(1037):     at org.json.JSON.typeMismatch(JSON.java:96)
08-28 18:56:08.083: W/System.err(1037):     at org.json.JSONArray.getJSONObject(JSONArray.java:484)
08-28 18:56:08.093: W/System.err(1037):     at com.example.skbf_csre.SKBFActivity.onCreate(SKBFActivity.java:55)
08-28 18:56:08.093: W/System.err(1037):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
08-28 18:56:08.093: W/System.err(1037):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1836)
08-28 18:56:08.103: W/System.err(1037):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1893)
08-28 18:56:08.103: W/System.err(1037):     at android.app.ActivityThread.access$1500(ActivityThread.java:135)
08-28 18:56:08.103: W/System.err(1037):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1054)
08-28 18:56:08.103: W/System.err(1037):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-28 18:56:08.113: W/System.err(1037):     at android.os.Looper.loop(Looper.java:150)
08-28 18:56:08.113: W/System.err(1037):     at android.app.ActivityThread.main(ActivityThread.java:4389)
08-28 18:56:08.113: W/System.err(1037):     at java.lang.reflect.Method.invokeNative(Native Method)
08-28 18:56:08.113: W/System.err(1037):     at java.lang.reflect.Method.invoke(Method.java:507)
08-28 18:56:08.123: W/System.err(1037):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
08-28 18:56:08.123: W/System.err(1037):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
08-28 18:56:08.123: W/System.err(1037):     at dalvik.system.NativeStart.main(Native Method)

What I amtrying to do is:

for (int i = 0; i < jsonArray.length(); i++) {
        JSONObject jsonObject = jsonArray.getJSONObject(i);
        System.out.println(jsonObject.getString("title"));
}

Thank you very much for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:38:15+00:00Added an answer on June 10, 2026 at 10:38 am

    It looks like you aren’t digging quite deep enough to get to your data. What you have is an array containing multiple arrays, each of which contains an object. Try this:

    for (int i = 0; i < jsonArray.length(); i++) {
            JSONArray innerJsonArray = jsonArray.getJSONArray(i);
            JSONObject jsonObject = innerJsonArray.getJSONObject(0);
            System.out.println(jsonObject.getString("title"));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to parse a JSON response from a server using javascript/jquery. This
I am trying to parse a JSON script from my server which contains a
I was trying to parse a JSON string from USGS . However I get
I;m trying to parse a json string which I receive from web server as
I'm trying to parse the json grabbed from here . Basically what I do
I am trying to parse FB comments JSON, which I get from var url
I'm trying to parse the json response from the Google Geocode API but I'm
I was trying to parse response data from web server. I am using Xcode
I am trying to parse the JSON response from Wordnik's API. This is built
I'm trying to use JSON, I'm getting the information from the server so I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.