Send Data as JSON not working

I’m trying to play adobe flash template with
when i sent it as XML i saw my gfx and data
but when i sent it as JSON, i just saw the gfx but the data was empty
anyone know why i can’t get the data? do i missed something

Thanks

caspar server log:

Received message from 127.0.0.1: CG 1-20 ADD 0 "SCORE/SCORE" 1 "<templateData><componentData id=\"hometeam\"><data id=\"text\" value=\"INA\"/></componentData><componentData id=\"awayteam\"><data id=\"text\" value=\"MAS\"/></componentData></templateData>"\r\n
Sent message to 127.0.0.1:202 CG OK\r\n

Received message from 127.0.0.1: CG 1-20 ADD 0 "SCORE/SCORE" 1 "{\"hometeam\":\"INA\",\"awayteam\":\"MAS\"}"\r\n
Sent message to 127.0.0.1:202 CG OK\r\n

*Note: Client and Server tested
CasparCG Client 2.0 and 2.2
with

  • CasparCG Server 2.1 beta 2
  • CasparCG Server 2.1.1 NRK Build
  • CasparCG Server 2.2 stable

As long as the Flash template is not explicitly crafted to receive JSON data it will only work with XML. The posibilty to send the data as JSON has been added to the client to support HTML templates, as in JavaScript it’s much easier to handle JSON data than XML.

In a Flash template the SetData function is automatically receiving an XML object, so it could be hard to get it to work with JSON. You would probably need to wrap it into XML.

Thanks didi …

Unless you use my template host files which translate the json to xml.

Replace your flash template host files with the files here:
https://drive.google.com/drive/folders/1sdVZjC0UCBWbw5LpUQs4PXaRqojCjWGa?usp=sharing

You’ll need to remove the old versions from your server folder and your templates folder and replace them with these.

Make sure they don’t have the swf file extension.

Privacy Policy   Terms of Service