Python Forum
Error when decoding JSON ( Expecting ',' delimiter:)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when decoding JSON ( Expecting ',' delimiter:)
#1
Hello!

I use Python 3.6.3 on the wildfly server.

I have two different REST services. When I call one of them (getMC) on the SoapUI, there occurs an error. I found a piece of JSON which causes it, but I don't know and don't understand why.

Bad piece of JSON:
Quote:"cookieId": "1548768911871854",
// sth more


Error occurs in this line of my Python script:
jattrs = request.get_json()
Error message:
Error:
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 1088057 (char 1088056)
What's interesting, when I change the cookieId value (digits, letters, same length), it works. The second service with the above JSON works properly too.

Do you have any idea how to solve my problem? If you need more details, feel free to ask.

Full not-working JSON:

Quote:{
"cookieId": "1548768911871854",
"firstVisit": 0,
"customerExtId": null,
"channelName": "www",
"referrer": null,
"actionMcType": null,
"offerType": null,
"actionOnProduct": null,
"pageTitle": "page title",
"pageDesc": "page description",
"pageKeywords": "page kw"
}
Reply


Messages In This Thread
Error when decoding JSON ( Expecting ',' delimiter:) - by tortoise - Feb-15-2019, 01:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  expecting value: line 1 column 1 (char 0) in print (r.json)) loutsi 3 7,708 Jun-05-2020, 08:38 PM
Last Post: nuffink
  500 error cannot deserialize json object SaiBhargav 0 2,833 Sep-18-2018, 09:53 PM
Last Post: SaiBhargav
  Decoding html to text string PeterPython 1 2,675 Aug-12-2018, 07:23 PM
Last Post: Larz60+
  Json decoding error saisankalpj 3 3,820 Jul-23-2018, 07:06 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020