Luca Casonato ๐Ÿณ๏ธโ€๐ŸŒˆ @lcas.dev ยท Dec 28

In a suprise to absolutely no one, the API the Italo app uses for real-time data is also beautifully designed. The disruption field has the great name "Distruption", and the dates are encoded as strings in the format "\/Date(1766949300000+0100)\/". Note those backslashes are not escaping anything.

20 likes 3 replies

?

Replies

Robin Berjon ยท Dec 30

Wanna bet they eval those dates? (It works, without the weird escaped slashes.)

Paolo Barbolini ยท Dec 28

That date thing has many hits on GH. Why can't the world just accept rfc3339 ๐Ÿคฌ github.com/search?q=%22...

Luca Casonato ๐Ÿณ๏ธโ€๐ŸŒˆ ยท Dec 28

On startup, the Italo app also fetches a various XML encoded bits of content from it's CDN that it uses to display ads and such on the index page. This XML is UTF-8 encoded, and then sent as a JSON array of integers in the range 0-255. This increases transfer size by slightly over 3.5x!