Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace XML songticker output with a JSON based format #34

Closed
hairmare opened this issue Jun 22, 2019 · 1 comment
Closed

Replace XML songticker output with a JSON based format #34

hairmare opened this issue Jun 22, 2019 · 1 comment

Comments

@hairmare
Copy link
Member

This issue tracks replacing the XML output format with a modern JSON replacement.

Currently one of the main output formats used by the nowplaying code base to deliver content to the website is an XML based format. The format looks something like follows:

<?xml version='1.0' encoding='UTF-8'?>
<ticker xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://rabe.ch/schema/ticker.xsd">
  <ticker>
    <identifier>ticker-b5231a3b-ebf5-46bc-bb7a-22674c8546a2</identifier>
    <creator>now-playing daemon v2</creator>
    <date>2019-06-22T11:30:25+02:00</date>
    <show id="d184a34e-574b-4b40-b461-c905b437e02b">
      <name>Piazza Italia</name>
      <link xlink:type="simple" xlink:href="https://www.rabe.ch" xlink:show="replace">https://www.rabe.ch</link>
      <startTime>2019-06-22T11:00:00+02:00</startTime>
      <endTime>2019-06-22T13:00:00+02:00</endTime>
    </show>
    <track id="0f6018e2-8287-472f-b3fa-da9d1ea5f7d5">
      <show ref="d184a34e-574b-4b40-b461-c905b437e02b">Piazza Italia</show>
      <artist>Radio Bern</artist>
      <title>Livestream</title>
      <startTime>2019-06-22T11:00:00+02:00</startTime>
      <endTime>2019-06-22T13:00:00+02:00</endTime>
    </track>
  </ticker>
</ticker>

At the time this was implemented XML was pretty much the most widely used format for such data interchange requirements as the format was intended to be used with XML HTTP Requests (XHR). Looking at the the web in 2019 it has become abundantly clear that the modern way to implement this would be using JSON.

Currently I think that the basic structure of the XML above reflects a sane way to represent what is needed by a frontend that wants to pull information. Given this we can implement this in JSON adhering to the same basic structure.

In the long run we should start thinking hybrid. The text parts of the ticker that are web facing could absolutely be replaced with a web frontend that supports the Hybrid Digital Radio (DAB, DRM, RadioDNS); SlideShow; User Application Spec. It we go down that route this issue is most likely obsolete.

@hairmare hairmare changed the title Replace XML songticker with a JSON based format Replace XML songticker output with a JSON based format Jun 22, 2019
@hairmare
Copy link
Member Author

hairmare commented Dec 19, 2021

Replaced by #128.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant