Xibo dataset with json file

Version: 2.3.7

If i try to use dataset and receive data from a json file, I always run in the error “No data found at the Dataroot”. I already copied a json file which should be working.

My Json file:
{
“data”: {
{
“id”: 1;
“date”: “2018-10-10 13:11:21”;
“title”: "Test 1;
};
{
“id”: 2;
“date”: “2018-10-11 03:04:41”;
“title”: "Test 2;
};
{
“id”: 3;
“date”: “2018-10-12 06:51:21”;
“title”: “Test 3”
}
}
}

However if i press test without any dataroot entered, i receive the same error code. On my webserver, where the file is located, i see a log input, that xibo try to get data from the file.
Any suggestion on this?

Thanks!

Do anyone have an idea on this ?

A quick check with a JSON validator says your JSON isn’t valid. You need to fix that before Xibo will be able to read it.

Hello Alex,

thank you for the reply. I changed the json file now. And checked it with a json validator

{
    "data": [
{

            "id": 1,
            "date": "2018-10-10 13:11:21",
            "title": "Test 1",
        },
        {
            "id": 2,
            "date": "2018-10-11 03:04:41",
            "title": "Test 2",
        },
        {
            "id": 3,
            "date": "2018-10-12 06:51:21",
            "title": "Test 3"
        }
]
}

However if i test the url i still receive no data found at the Dataroot data. Am i doing something wrong ?

What is the actual JSON you’re using, and what are you setting as the dataroot?

What you’ve put above is still not valid:

It looks to me like you’re putting the processed output from Xibo and not the source json in, which isn’t helpful. We need to see the source JSON and how you’ve configured the dataset please.

okay, now i tried multiple validator online.

{
“data”: {
“id1”: 1,
“date1”: “2018-10-10 13:11:21”,
“title1”: “Test 1”,
“id2”: 2,
“date2”: “2018-10-11 03:04:41”,
“title2”: “Test 2”,
“id3”: 3,
“date3”: “2018-10-12 06:51:21”,
“title3”: “Test 3”
}
}

Hopefully this is valid now, however same error in xibo.
I can access the file, because i see this in the logs from my apache.

Kr Marcel

Hi Marcel,
Please can you try the following:

{
   "data":[
      {
         "id":1,
         "date":"2018-10-10 13:11:21",
         "title":"Test 1"
      },
      {
         "id":2,
         "date":"2018-10-11 03:04:41",
         "title":"Test 2"
      },
      {
         "id":3,
         "date":"2018-10-12 06:51:21",
         "title":"Test 3"
      }
   ]
}

Hi Frazer,

thank you for your reply.

I still receive the same error "“No data found at the DataRoot data”. If i change the access to csv i can test the url and also receive the new data.

Thanks!

KR Marcel

To round this out, on further investigation we found that the source JSON file was UTF-8 with BOM encoded - and JSON requires no BOM to function. Converting to UTF-8 resolved it.

The Xibo Community site uses cookies. What are cookies?