Author Topic: Parse single plain text line with - separators to json  (Read 469 times)

Bill

  • Newbie
  • *
  • Posts: 8
Parse single plain text line with - separators to json
« on: November 13, 2026, 11:32:48 pm »
Our automation only outputs a single line of plain text:  Text=cut duration seconds - category - artist - title - .    Can Magic RDS parse to values %1%, %2%, %3%, %4% and output to json for DTS Autostage?

Jan

  • Hero Member
  • *****
  • Posts: 1341
Re: Parse single plain text line with - separators to json
« Reply #1 on: November 15, 2026, 11:26:41 am »
I liked your idea so much that I implemented it into the current version, 4.3.6, over the weekend.

  • Add a new Connection: General Text Output - JSON Template. Internal channel, save to file.
  • Follow the standard procedure for sending external text to the selected Connection.
  • Enable RT+ support in the text source and fill in the template:
    Text=<not_assigned/> - <not_assigned/> - <not_assigned/> - <not_assigned/> - .
    You may assign any RT+ tags as you like, for use with an RDS encoder, but it has no effect on the JSON content.
  • In the JSON output, be sure to adjust the JSON template to match the actual structure required by the target application.



Bill

  • Newbie
  • *
  • Posts: 8
Re: Parse single plain text line with - separators to json
« Reply #2 on: November 16, 2026, 08:29:10 pm »
Thanks!  Will start trying this out.

Bill

  • Newbie
  • *
  • Posts: 8
Re: Parse single plain text line with - separators to json
« Reply #3 on: November 19, 2026, 02:17:52 am »
It's now writing the parsed text to a JSON file.   Now how can I send that file via HTTP POST to a URL?   I read instructions I don't understand posted here many months ago.

Jan

  • Hero Member
  • *****
  • Posts: 1341
Re: Parse single plain text line with - separators to json
« Reply #4 on: November 19, 2026, 08:12:31 am »
Magic RDS 4 includes integrated curl support, so sending JSON file via HTTP POST is possible.

However, we first need to know exactly what the DTS AutoStage server expects. There are several ways to send JSON data using HTTP POST: directly in the request body, as a parameter, or as an uploaded file.

Could you please provide the HTTP API specifications or an example request supplied by DTS AutoStage? In particular, the endpoint URL, required parameters, Content-Type, and authentication method would be helpful. You likely received this information during registration; it must be provided in the exact format in which you received it, with the exception of the password. Unfortunately, DTS AutoStage does not publish its API specification anywhere, so I cannot provide any further assistance at this time.

I also wrote to DTS support, asking them to provide the relevant API. However, they are a typical closed-off corporation that offers no contact options other than a web form.

Once we have this information, we can determine how to configure Magic RDS 4 for this purpose. If I manage to obtain the information, it will be possible to add the DTS AutoStage model directly into Magic RDS.

Bill

  • Newbie
  • *
  • Posts: 8
Re: Parse single plain text line with - separators to json
« Reply #5 on: December 03, 2026, 10:34:54 pm »
I found these DTS instructions at https://www.mbradio.it/en/support/help/113-configuration/1412-dts-autostage-uk
Latest version of Magic RDS 4 is sending now playing to DTS Autostage perfectly with settings in these instructions.   DTS appears to have many formats for various softwares.   The format used here is a generic format working nicely from Magic RDS.
DTS provides an endpoint URL during the onboarding process.   The format specified in the URL is flexible.
Choose Hybrid Radio, Simple HTTP, HTTP Client, paste the endpoint URL provided by DTS, enter your external text sources in the box such as artist=%3%, title=%4%


Jan

  • Hero Member
  • *****
  • Posts: 1341
Re: Parse single plain text line with - separators to json
« Reply #6 on: December 03, 2026, 10:43:45 pm »
Thank you very much for sharing this information and, especially, for testing it with Magic RDS 4!

It's great to know that DTS AutoStage works with our existing Simple HTTP model. This confirms that no special integration is needed.

I'll add DTS AutoStage as a predefined model under the Hybrid Radio category in the next few days, alongside Radioplayer and TuneIn. This will make the configuration easier for other users.

Thanks again for your valuable feedback!