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 8936411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:12:32+00:00 2026-06-15T10:12:32+00:00

I am trying to parse the following json text in python but I am

  • 0

I am trying to parse the following json text in python but I am getting error,
Although I am able to parse this json text using a Json Viewer . So I guess my json text is correct , Can someone please help me what is wrong here ?

import json as j

data = '{"c":[{"xy":{"xstart":0,"xend":5,"ystart":1,"yend":5},"names":["D","T","O","H","L","C",],"co":["rgb(0,0,128)"]}],"Values":{"D":["11/30/2012"],"T":["09:44:00"],"O":["5848.40"],"H":["5848.40"],"L":["5847.45"],"C":["5848.40"]}}'
json_data = j.loads(data)
#print json_data["c"][0]



Traceback (most recent call last):
  File "C:json\jsonexample.py", line 4, in <module>
    json_data = j.loads(data)
  File "C:\Python27\lib\json\__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Python27\lib\json\decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
  • 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-15T10:12:33+00:00Added an answer on June 15, 2026 at 10:12 am

    It looks like it is a problem with your actual string. This line:

    "names":["D","T","O","H","L","C",]
    

    Has an extra comma after the "C". Try removing that and see if it works as expected.

    In [1]: import json as j
    
    In [2]: data = '{"c":[{"xy":{"xstart":0,"xend":5,"ystart":1,"yend":5},"names":["D","T","O","H","L","C"],"co":["rgb(0,0,128)"]}],"Values":{"D":["11/30/2012"],"T":["09:44:00"],"O":["5848.40"],"H":["5848.40"],"L":["5847.45"],"C":["5848.40"]}}'
    
    In [3]: json_data = j.loads(data)
    
    In [4]: json_data['c'][0]
    Out[4]:
    {u'co': [u'rgb(0,0,128)'],
     u'names': [u'D', u'T', u'O', u'H', u'L', u'C'],
     u'xy': {u'xend': 5, u'xstart': 0, u'yend': 5, u'ystart': 1}}
    
    • 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 the following JSON but i am getting the following
I'm trying to parse json request using google GSON (on Android although this is
I'm trying to parse this JSON data: into R, using the following lines of
Trying to parse the following json using gson in my android app but givien
I am trying to parse the following JSON data, but it seems that it
I am trying to parse JSON of the following form using aeson {field:{name:...}} or
I'm trying to display the following JSON object using YUI DataTable. I was able
I am trying to parse the following JSON string remotely: [{name:Object1,data:[1,2]},{name:Object2,data:[3,4]}] I am doing
I am trying to parse the json values from the following stream: {id: tag:search.xxxxx.com,2005:xxxxxxxxxxx}
I'm trying handle bad json data when parsed through json_decode(). I'm using the following

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.