Read Json on Xibo?

hello Dan

I wonder if there is any way to read a URL that generates a json by Xibo.

It would be something similar to what is offered to Ticker.

Example: When you access a XXXXX address the page shows the json:

{ “NPS” “60.0”}

I tried the Ticker and it did not work.

Hi!

We don’t have a JSON module out the box - simply because the format of the message isn’t standard - the format could and probably would vary depending on the data source. RSS is a standard format across data sources, which is why we can have a generic module for it.

You could design a simple module (extending the ticker module) which overloaded the getRssItems method and instead parsed and returned the JSON - or (and preferably) have a scheduled API application which pushed that data in a DataSet - and then you have a DataSet Ticker to show the data.

Do you have just one format you’d like to parse - or many formats?

I’d like to see a json parser, for which you can just give variables like $string->info->text into the appearance field or something. Could be very usefull since json is going to be more standard and in use than rss if it comes to getting info from external sources. Rss is nice as a news ticker, but json gives so much better and quicker performance

I appreciate your perspective - as stated before, parsing a JSON source into an object is not a problem - neither is using some programmatic logic to display that, but making that configurable is very difficult indeed.

Your example is probably over simple - there is more than likely an array involved, which then makes selecting what you want much harder.

Our eventual approach to this would be more along the lines of providing some mapping logic to import your JSON source into a DataSet, and then use that DataSet to present the data.