score:0

Accepted answer

Invalid JSON. After formatting (removing last line commas and replacing single quotes with double):

{
"nodes": [{
        "name": "NE1",
        "full_name": "NE1",
        "type": 2,
        "slug": "12.3",
        "entity": "company",
        "img_hrefD": "",
        "img_hrefL": ""
    },
    {
        "name": "NE2",
        "full_name": "NE2",
        "type": 2,
        "slug": "12.4",
        "entity": "company",
        "img_hrefD": "",
        "img_hrefL": ""
    },
    {
        "name": "NE3",
        "full_name": "NE3",
        "type": 2,
        "slug": "12.3",
        "entity": "company",
        "img_hrefD": "",
        "img_hrefL": ""
    },
    {
        "name": "NE4",
        "full_name": "NE4",
        "type": 2,
        "slug": "12.1",
        "entity": "company",
        "img_hrefD": "",
        "img_hrefL": ""
    },
    {
        "name": "NE5",
        "full_name": "NE5",
        "type": 2,
        "slug": "12.0",
        "entity": "company",
        "img_hrefD": "",
        "img_hrefL": ""
    }
],
"links": [{
        "source": 0,
        "target": 1,
        "value": 1,
        "distance": 15,
        "a": "123",
        "z": "111"
    },
    {
        "source": 0,
        "target": 2,
        "value": 1,
        "distance": 15,
        "a": "123",
        "z": "111"
    },
    {
        "source": 0,
        "target": 3,
        "value": 1,
        "distance": 15,
        "a": "123",
        "z": "111"
    },
    {
        "source": 1,
        "target": 2,
        "value": 1,
        "distance": 15,
        "a": "123",
        "z": "111"
    },
    {
        "source": 1,
        "target": 3,
        "value": 1,
        "distance": 15,
        "a": "123",
        "z": "111"
    },
    {
        "source": 2,
        "target": 3,
        "value": 1,
        "distance": 15,
        "a": "123",
        "z": "111"
    },
    {
        "source": 1,
        "target": 4,
        "value": 1,
        "distance": 15,
        "a": "123",
        "z": "111"
    }
]
}

Here's a plunkr using the above JSON: http://plnkr.co/edit/vRrYyjH3mtPz8vEuTZKx?p=preview

Recommendation: Use JSON Lint for validation.

Hope this helps.


Related Query