JSON Parse: Expecting "EOF" got undefined error

317 Views Asked by At

Im trying to PARSE this JSON and getting this error Expecting "EOF" got undefined error, not sure not sure what I am missing in line 14.

Im trying to PARSE this JSON and getting this error Expecting "EOF" got undefined error, not sure what I am missing in line 14.

example:

{
    "plotOptions": {
        "series": {
            "dataLabels": {
                "enabled": true
            }
        },
        "column": {
            "stacking": "percent",
            "dataLabels": {
                "format": "{point.percentage:.1f}%"
            },
            "tooltip": {
                "pointFormat": "<span style="\ & quot;color: {
                    point.color
                }\ & quot;
                ">●</span> {series.name}: <b>{point.y} ({point.percentage:.1f}%)</b><br>"
            }
        },
        "bar": {}
    },
    "yAxis": {
        "stackLabels": {
            "enabled": true
        },
        "title": {}
    },
    "xAxis": {
        "title": {}
    },
    "categorySort": "asc"
}
1

There are 1 best solutions below

0
user1019903 On

This issue is with string quoting for this attribute pointFormat: I removed the back-slash, connected ampsand with "quot" and used single quote inside the double quote, then it becomes a valid JSON, see screenshot below

enter image description here