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

Modern replacment for XML Output #128

Open
hairmare opened this issue Dec 19, 2021 · 0 comments
Open

Modern replacment for XML Output #128

hairmare opened this issue Dec 19, 2021 · 0 comments

Comments

@hairmare
Copy link
Member

hairmare commented Dec 19, 2021

This issue tracks replacing the XML output format with a modern JSON replacement. It replaces #34.

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. If we go down that route this issue is most likely obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant