views:

723

answers:

2

Hi there, I got problem. I have this JSON automatically generated by Open Flash Chart php library. The problem is, OFC report JSON Parse Error [Syntax Error] while test result using http://www.jsonlint.com/ report that my JSON is fine. But, w3c parser report error too:(

Any help?

Here's the JSON:

{
    "title": "Followers Trend",
    "elements": [
        {
            "type": "area_hollow",
            "fill-alpha": 0.35,
            "values": [

            ],
            "colour": "#5B56B6",
            "text": "Followers",
            "font-size": 12 
        } 
    ],
    "x_axis": {
        "colour": "#A2ACBA",
        "grid-colour": "#D7E4A3",
        "offset": false,
        "steps": 4,
        "labels": {
            "steps": 2,
            "rotate": "vertical",
            "colour": "#A2ACBA",
            "labels": [

            ] 
        } 
    },
    "x_legend": {
        "text": "Week Trend (2009-08-17 - 2009-08-24)",
        "style": "{font-size: 20px; color: #778877}" 
    },
    "y_axis": {
        "min": 0,
        "max": 150,
        "steps": 30 
    }
}
+1  A: 

I think the w3c parser is having issues, I couldn't even get it to parse this:

{
    "title" : "Followers Trend"
}

It gave me this error:

Validation errors:

lexer couldn't parse at "{
    "title" : "Followers Trend"
}"
Kevin Hakanson
As I stated above, w3c does failed. What I don't understand is, OFC report failed too but JSONLint doesn't. I don't know what i wrong with the json. It looks good to me :(
silent
+1  A: 

http://json.bloople.net helps you visualise the code to find and correct errors.