Q:

correct structure for a json object with multiple values

I am creating a graph (GANTT graph) and I need to pass to the plugin a JSON file with all the values to build the graph.
The example json for the plugin is this:
source: [{
    name: "Example",
    desc: "Lorem ipsum dolor sit amet.",
    values: [{
        to: "/Date(1328832000000)/",
        from: "/Date(1333411200000)/",
        desc: "Something",
        label: "Example Value",
        customClass: "ganttRed",
        dataObj: foo.bar[i]
    }]
},
{
    name: "Example1",
    desc: "Stackoverflow rulez.",
    values: [{
        to: "/Date(1328832000000)/",
        from: "/Date(1333411200000)/",
        desc: "Something else",
        label: "Example Value 1",
        customClass: "ganttGreen",
        dataObj: foo.bar[i]
    }]
}]

I added the Example1 element and then tried to validate with JSONLint to be sure I am building the Array in the right way. To my surprise the validator came out saying that the syntax is invalid after the first [{ (obviously I didn't pass source: to the validator). 
The error message I get says:

Error: Parse error on line 1:
[{    name: "Example",    de
--^
Expecting 'STRING', '}', got 'undefined'

What am I doing wrong? Why is the validator raising this error? The Json was written in plain txt format with notepad++ so I cannot think of hidden text in the white spaces

A:

To pass the data to be a valid JSONLint wrap all the keys in json object as string.
valid json for your input is 
"source": [{
    "name": "Example",
    "desc": "Lorem ipsum dolor sit amet.",
    "values": [{
        "to": "/Date(1328832000000)/",
        "from": "/Date(1333411200000)/",
        "desc": "Something",
        "label": "Example Value",
        "customClass": "ganttRed",
        "dataObj": foo.bar[i]
    }]
},
{
    "name": "Example1",
    "desc": "Stackoverflow rulez.",
    "values": [{
        "to": "/Date(1328832000000)/",
        "from": "/Date(1333411200000)/",
        "desc": "Something else",
        "label": "Example Value 1",
        "customClass": "ganttGreen",
        "dataObj": foo.bar[i]
    }]
}]

