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

  • Home
  • SEARCH
  • 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 6369731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:50:32+00:00 2026-05-25T00:50:32+00:00

I am grabbing a string and using $.parseJSON(string) but keep getting the following error:

  • 0

I am grabbing a string and using $.parseJSON(string) but keep getting the following error:

uncaught exception: Invalid JSON: {"0":{"chartHtml":"<p> Slide 1</p> ","presNote":"","chartOrderIndex":0},"1":{"chartHtml":"<p> Slide 2</p> ","presNote":"","chartOrderIndex":1},"2":{"chartOrderIndex":2},"3":{"chartHtml":"<p> e 3</p> ","presNote":"","chartOrderIndex":3},"4":{"chartHtml":"<p> Slide 4</p> ","presNote":"","chartOrderIndex":4},"5":{"chartHtml":"<p> Slide 5</p> ","presNote":"","chartOrderIndex":5},"6":{"chartOrderIndex":6}}

Firebug results during debug after running slideJson.d:

    >>> slideJson.d
"{"0":{"chartHtml":"<p> Slide 1</p> ","presNote":"","chartOrderIndex":0},"1":{"chartHtml":"<p> Slide 2</p> ","presNote":"","chartOrderIndex":1},"2":{"chartOrderIndex":2},"3":{"chartHtml":"<p> e 3</p> ","presNote":"","chartOrderIndex":3},"4":{"chartHtml":"<p> Slide 4</p> ","presNote":"","chartOrderIndex":4},"5":{"chartHtml":"<p> Slide 5</p> ","presNote":"","chartOrderIndex":5},"6":{"chartOrderIndex":6}}"

Here is some of the call to deserialize the json:

function (slideJson) {
var slideObj, jsonStr;
if (slideJson.d) {
    slideObj = $.parseJSON(slideJson.d);

Ajax call to get the Json with content type:

$.ajax({
    url: 'Someurl',
    type: "POST",
    data: "{}",
    dataType: "json",
    contentType: "application/json; charset=utf-8",
    success: function (data) { somenamespace.loadSlides(data); }
});
  • 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-05-25T00:50:33+00:00Added an answer on May 25, 2026 at 12:50 am

    The JSON string in question ended up containing \n and \r in the chartHTML property, which by default are generated by the CKeditor .getData() method. Since i was pasting the errors from firebug they were not visible and the JSON appeared to be valid which lead to my confusion.

    Thanks to those who answered.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using pyparsing to parse HTML. I'm grabbing all embed tags, but in some
I have this method for grabbing the file name from a string URI. What
I'm grabbing lines from a text file and sifting line by line using regular
EDIT: THIS QUESTION IS INVALID SINCE THE SERVER I'M USING HAS SUDDENLY EXPIRED. PLEASE
I’m having trouble getting a AJAX/JSON function to work correctly. I had this function
I’m having trouble getting a AJAX/JSON function to work correctly. I had this function
Using Python, how would I go about reading in (be from a string, file
I am grabbing posts from the WordPress database using this piece of code: $query
I've been trying to slice two characters out of a string using a loop,
I have an ASPX MVC v3 applications that is using String sourceIp = Request.ServerVariables[REMOTE_ADDR];

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.