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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:27:20+00:00 2026-05-20T14:27:20+00:00

I have a strange IE error, and all i can find on google is

  • 0

I have a strange IE error, and all i can find on google is that the error should come when you have a trailing comma in a dictionary or an array. But since my JSON is perfectly leagal according to JSONLint, i am getting really frustrated.. The JSON is listed here. My question is. Did anyone experience this error where it wasn’t “,”-related ? Any help or guidance would be greatly apreciated..

By the way the error shows up in any JSON decoder i have tried, but the one i want to use is mootools JSON.decode

{
    "spine": [
        "title.xml",
        "about.xml",
        "main0.xml",
        "main1.xml",
        "main2.xml",
        "main3.xml",
        "main4.xml",
        "main5.xml",
        "main6.xml",
        "main7.xml",
        "main8.xml",
        "main9.xml",
        "main10.xml",
        "main11.xml",
        "similar.xml",
        "feedbooks.xml"
    ],
    "chapters": {
        "main9.xml": "TEST",
        "similar.xml": "TEST",
        "title.xml": "TEST",
        "main10.xml": "TEST",
        "feedbooks.xml": "TEST",
        "about.xml": "TEST",
        "main0.xml": "TEST",
        "main5.xml": "TEST",
        "main4.xml": "TEST",
        "main8.xml": "TEST",
        "main6.xml": "TEST",
        "main11.xml": "TEST",
        "main3.xml": "TEST",
        "main1.xml": "TEST",
        "main7.xml": "TEST",
        "main2.xml": "TEST"
    },
    "manifest": {
        "ncx": {
            "href": "fb.ncx",
            "media-type": "application/x-dtbncx+xml"
        },
        "titlepage": {
            "href": "title.xml",
            "media-type": "application/xhtml+xml"
        },
        "logo-feedbooks": {
            "href": "images/logo-feedbooks.png",
            "media-type": "image/png"
        },
        "logo-feedbooks-tiny": {
            "href": "images/logo-feedbooks-tiny.png",
            "media-type": "image/png"
        },
        "about-css": {
            "href": "css/about.css",
            "media-type": "text/css"
        },
        "feedbooks": {
            "href": "feedbooks.xml",
            "media-type": "application/xhtml+xml"
        },
        "main8": {
            "href": "main8.xml",
            "media-type": "application/xhtml+xml"
        },
        "main9": {
            "href": "main9.xml",
            "media-type": "application/xhtml+xml"
        },
        "main0": {
            "href": "main0.xml",
            "media-type": "application/xhtml+xml"
        },
        "main1": {
            "href": "main1.xml",
            "media-type": "application/xhtml+xml"
        },
        "main2": {
            "href": "main2.xml",
            "media-type": "application/xhtml+xml"
        },
        "main3": {
            "href": "main3.xml",
            "media-type": "application/xhtml+xml"
        },
        "main4": {
            "href": "main4.xml",
            "media-type": "application/xhtml+xml"
        },
        "main5": {
            "href": "main5.xml",
            "media-type": "application/xhtml+xml"
        },
        "main6": {
            "href": "main6.xml",
            "media-type": "application/xhtml+xml"
        },
        "main7": {
            "href": "main7.xml",
            "media-type": "application/xhtml+xml"
        },
        "main10": {
            "href": "main10.xml",
            "media-type": "application/xhtml+xml"
        },
        "main11": {
            "href": "main11.xml",
            "media-type": "application/xhtml+xml"
        },
        "newspaper-css": {
            "href": "css/newspaper.css",
            "media-type": "text/css"
        },
        "page-css": {
            "href": "css/page.css",
            "media-type": "text/css"
        },
        "about": {
            "href": "about.xml",
            "media-type": "application/xhtml+xml"
        },
        "main-css": {
            "href": "css/main.css",
            "media-type": "text/css"
        },
        "titlepage-css": {
            "href": "css/title.css",
            "media-type": "text/css"
        },
        "feedbooks-css": {
            "href": "css/feedbooks.css",
            "media-type": "text/css"
        },
        "similar": {
            "href": "similar.xml",
            "media-type": "application/xhtml+xml"
        }
    },
    "spinereal": [
        "title.xml",
        "about.xml",
        "main0.xml",
        "main1.xml",
        "main2.xml",
        "main3.xml",
        "main4.xml",
        "main5.xml",
        "main6.xml",
        "main7.xml",
        "main8.xml",
        "main9.xml",
        "main10.xml",
        "main11.xml",
        "similar.xml",
        "feedbooks.xml"
    ],
    "contents": [
        {
            "src": "title.xml",
            "id": "level1-titlepage",
            "title": "Title"
        },
        {
            "src": "about.xml",
            "id": "level1-about",
            "title": "About"
        },
        {
            "src": "main0.xml",
            "id": "chap578",
            "title": "Chapter 1"
        },
        {
            "src": "main1.xml",
            "id": "chap580",
            "title": "Chapter 2"
        },
        {
            "src": "main2.xml",
            "id": "chap582",
            "title": "Chapter 3"
        },
        {
            "src": "main3.xml",
            "id": "chap584",
            "title": "Chapter 4"
        },
        {
            "src": "main4.xml",
            "id": "chap586",
            "title": "Chapter 5"
        },
        {
            "src": "main5.xml",
            "id": "chap588",
            "title": "Chapter 6"
        },
        {
            "src": "main6.xml",
            "id": "chap590",
            "title": "Chapter 7"
        },
        {
            "src": "main7.xml",
            "id": "chap592",
            "title": "Chapter 8"
        },
        {
            "src": "main8.xml",
            "id": "chap594",
            "title": "Chapter 9"
        },
        {
            "src": "main9.xml",
            "id": "chap596",
            "title": "Chapter 10"
        },
        {
            "src": "main10.xml",
            "id": "chap598",
            "title": "Chapter 11"
        },
        {
            "src": "main11.xml",
            "id": "chap600",
            "title": "Chapter 12"
        },
        {
            "src": "similar.xml",
            "id": "level1-similar",
            "title": "Recommendations"
        }
    ],
    "metadata": {
        "publisher": "TEST",
        "rights": "TEST",
        "description": "TEST",
        "language": "TEST",
        "creator": "TEST",
        "title": "TEST",
        "source": "TEST",
        "coverage": "",
        "date": "TEST",
        "identifier": "TEST",
        "subject": "TEST"
    }
}

UPDATE

Ok guys.. i’ve kind of solved my problem.. The way i was getting the json was from Django, i assumed i could simple take the simplejson.dump of my dictionary and then use it in a template like this:

var opf = {{ var }}

This worked perfectly fine in webkit and mozilla browsers, however IE choked on it with the mysterious error on that exact line. So.. What i tried was

var opf = JSON.decode({{var}});

and

var opf = JSON.decode("{{var}}");

which generated the exact same error but now the error happened somewhere in mootools. I tried everything.. :/ so what i ended up doing, was to make a Request.JSON instead so that i dont pass the variable to the template. Now IE suddently play nicely :/ i feel it is a bit of a hack, but what the heck. Thanks for the quick replies guys..

  • 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-20T14:27:21+00:00Added an answer on May 20, 2026 at 2:27 pm

    Updated answer:

    I think it must be an error elsewhere on the page. Dimitar pointed out below that you tagged your question mootools and so are probably using JSON.decode, but that works fine:

    var obj, json;
    json = '...your JSON...';
    obj = JSON.decode(json);
    

    Live example

    Alternately: If what you’ve quoted appears literally in your JavaScript code (not enclosed in a string, not being loaded from the server via XHR or something), then what you’ve quoted is a JavaScript object literal, not JSON, and you don’t parse it at all. Simplified example:

    JavaScript object literal:

    var obj = {
        foo: "bar"
    };
    

    Quotes around the property names are optional in an object literal (not so in JSON, where they’re required), so this is fine too:

    var obj = {
        "foo": "bar"
    };
    

    JSON:

    var json = '{' +
               '   "foo": "bar"' +
               '}';
    var obj = JSON.decode(json);
    

    Original answer: (having missed the mootools tag)

    It works fine with json2.js, even back on IE6:

    var obj, json;
    json = '...your JSON...';
    obj = JSON.parse(json); // where `json` is a string containing your JSON
    

    Live example

    Sounds like a problem with how it’s being parsed, or perhaps a problem elsewhere in the code.

    If you’re using raw eval, be sure you wrap the JSON in parentheses:

    var obj, json;
    json = '...your JSON...';
    obj = eval('(' + json + ')');
    

    Live example

    …but I wouldn’t recommend using eval to parse JSON (not even json2, which uses eval under the covers) unless you’re sure of the source (e.g., your own server). I’d probably use one of the non-eval parsers from Crockford’s github page.

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

Sidebar

Related Questions

I have come across a strange error. I have an Android project that uses
I have a strange error where my jquery ajax request doesn't submit all the
it is very strange, because this error doesn't happen all the time... I have
I experience strange problem. We have error handling in global.asax that would redirect user
I have a strange error in my code and i can't see the problem.
I've been getting a strange error that has had me hung up all morning.
I currently have a table that is listed as follows: projects = Project.find(:all, :conditions
I have a problem so strange that I hardly can put an adequate title
I have strange error and not sure how to tackle it without wasting too
I have this strange error, When I call $element_attrs = $element -> attributes(); I

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.