JSON Archives - Waking up in Geelong https://wongm.com/tag/json/ Marcus Wong. Gunzel. Engineering geek. History nerd. Thu, 25 Jul 2024 07:11:50 +0000 en-AU hourly 1 https://wordpress.org/?v=6.7.1 23299142 On a Siemens train headed to JSON station https://wongm.com/2024/07/siemens-train-melbourne-json-data-destination-screen/ https://wongm.com/2024/07/siemens-train-melbourne-json-data-destination-screen/#comments Mon, 22 Jul 2024 21:30:00 +0000 https://wongm.com/?p=22307 The other week I spotted something strange on my train home – the gibberish looking message on the destination screen of a Melbourne train. So what’s the story here? To be accurate, the message wasn’t complete gibberish – but {"Colour": "#009639", "text": "Flinders Street"} – JSON formatted data for ‘Flinders Street’ and hex colour code […]

The post On a Siemens train headed to JSON station appeared first on Waking up in Geelong.

Post retrieved by 35.215.163.46 using

]]>
The other week I spotted something strange on my train home – the gibberish looking message on the destination screen of a Melbourne train. So what’s the story here?

JSON formatted 'Colour: #009639, text: Flinders Street' message displayed on the destination board of Siemens 816M

To be accurate, the message wasn’t complete gibberish – but {"Colour": "#009639", "text": "Flinders Street"}JSON formatted data for ‘Flinders Street’ and hex colour code for green ‘#009639‘.

Many people guessed that the cause of this bug is “colour” vs “color” spelling, with CSS requiring the use of the American ‘color’ spelling, but it’s actually a much more obscure bug…

The backstory

When first delivered back in the early-2000s, the fleet of Siemens trains in Melbourne were fitted with a low resolution LED matrix display to show the names of upcoming stations.

'Laverton train' displayed on the PIDS onboard a Siemens train

However two decades later this passenger information and communication system was approaching the end of life, so an upgraded system was installed in two stages – the first being the new hardware being installed, but operating the same as the previous system, but on the new high resolution LED displays.

'Next stop: Southern Cross' on the PIDS onboard a Siemens train

And followed by stage two – a software change to show a dynamic route map to passengers.

'Flinders Street' message on the new dynamic route map displays onboard Siemens 707M

But there was one problem – the Siemens trains are 3-car sets, coupled together to form a 6-car train in normal operation, with communication signals sent across the coupler.

Dellner coupler linking two Siemens trains

But if an train with the updated dynamic route map software leads an unmodified train, the payload for other half of the train to display is JSON formatted, which an unmodified train doesn’t know how to handle, and so blindly spits out the gibberish to the passenger facing displays.

JSON formatted 'Colour: #009639, text: Flinders Street' message displayed on the destination board of Siemens 816M

At least the data structure they chose wasn’t XML – or even worse, YAML. ☠

A Twitter related footnote

I originally posted the above video to Twitter, went to bed, and realised a few days later it had 830,000 views, 21,000 likes 1,900 retweets and 83 comments against it.

I didn’t notice it at the time because I’m not a heathen who enables notifications on their phone.

Post retrieved by 35.215.163.46 using

The post On a Siemens train headed to JSON station appeared first on Waking up in Geelong.

]]>
https://wongm.com/2024/07/siemens-train-melbourne-json-data-destination-screen/feed/ 3 22307