JSON serverlist

The 2009 Mana project went dormant around 2014 and was revived in 2023; it currently develops a client implementation for TMW and potentially other games.


Post Reply
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

JSON serverlist

Post by Ablu »

Hello,

How do we want to structure a JSON serverlist?

I thought about something like this:

Code: Select all

{
    // Place for stuff like latest client version / future expansion
    "servers": [
        {
            "name": "Source of Tales",
            "hostname": "testing.manasource.org",
            "port": 9601,
            "description": "The LPC 2012 entry by the Mana team.",
            "website": "http://manasource.org/",
            "state": "TEST",
        },
    ]
}
Also saving this link (i fear to loose it otherwise :P). It shows a possible implementation: https://bugreports.qt-project.org/browse/QTBUG-12117

Regards,
Ablu
User avatar
Bjørn
Manasource
Manasource
Posts: 1483
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Re: JSON serverlist

Post by Bjørn »

Looks fine to me, though note that JSON doesn't officially allow comments (but some parsers will deal with them). :-)
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: JSON serverlist

Post by Ablu »

Bjørn wrote:Looks fine to me, though note that JSON doesn't officially allow comments (but some parsers will deal with them). :-)
Yeah, I did not plan to include that comment there ;)
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: JSON serverlist

Post by Crush »

Don't you already have a serverlist in XML? Is there really a benefit in reimplementing all this in JSON? Personally I prefer JSON over XML for most situations because the complexity of XML is overkill for most use-cases, but why add yet another dependency?
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Ablu
Manasource
Manasource
Posts: 288
Joined: 23 Jul 2011, 08:31
Location: Germany

Re: JSON serverlist

Post by Ablu »

We want to use the JSON one in the qt client only. So it basically is one dependency less since we do not depend on the xmlpatterns (we need the patterns since we filter for type in the QML XmlListModel module and JSON is supported by qt directly anyway.

Regards,
Ablu
Post Reply