XML and/or JSON support

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Axensus

XML and/or JSON support

Post by Axensus »

GZDoom has no dedicated utilities for reading JSON/XML exported to ZScript. The Dictionary class can parse from/to JSON, but it's obsolete and rather limited. Everything is a string. Converting to/from the real type on the ZScript side adds additional overhead, aside from just being clunky as hell to do. Plus I don't need it for dictionaries. What I need this for is to define custom data lumps in a sensible format that's a standard instead of having to come up with my own half-baked syntax and then parser. The end purpose is to create cross-compatible lumps without creating a hard dependency with the addon that utilizes them. That's it for the feature suggestion. Now to preemptively answer the most likely posts that would follow:

>just use ScriptScanner for parsing bro
There's fuck all documentation on that. Not even a basic description of what it does, much less how to use it. It also sounds incredibly overengineered for this purpose, but that's a different topic.

>just use RicardoLuis0's ZJSON library bro
Usage of libraries in this engine is cancer squared due to how it's more or less required to copy-paste them inside the mod. That extra layer of pointless maintenance can go die in a ditch. Requiring it as an external dependency is also out of the question because the concept of external libraries is completely foreign to the average Doom player. The entire notion of loading an additional mod besides the one downloaded may result in user injury or death.
User avatar
R4L
Global Moderator
Posts: 419
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: XML and/or JSON support

Post by R4L »

Axensus wrote: Wed Aug 28, 2024 1:55 am
>just use ScriptScanner for parsing bro
There's fuck all documentation on that. Not even a basic description of what it does, much less how to use it. It also sounds incredibly overengineered for this purpose, but that's a different topic.

>just use RicardoLuis0's ZJSON library bro
Usage of libraries in this engine is cancer squared due to how it's more or less required to copy-paste them inside the mod. That extra layer of pointless maintenance can go die in a ditch. Requiring it as an external dependency is also out of the question because the concept of external libraries is completely foreign to the average Doom player. The entire notion of loading an additional mod besides the one downloaded may result in user injury or death.
Are you honestly expecting a nice reply to this? There is no need to speak in this manner as it almost guarantees an illicit response from anyone who will bother to correspond with you. You can be critical of shortcomings, there's nothing wrong with that, but I advise you to tone it down a bit if you want a civil conversation.
Axensus

Re: XML and/or JSON support

Post by Axensus »

>Are you honestly expecting a nice reply to this?
Not really, no. I'm just jaded to the point of simply not caring in the slighest about this engine's future anymore. Been working with it and the wider community's mostly ass-backwards second-grade-workarounds mindset for far longer than what should be considered healthy by international standards. I know this feature suggestion will reach the bottom of the forum and die there regardless of how I word it. Which begs the question of why bother. Answer: just to get it out of my system. Same with bug reports. I report them because I have to sleep at night, completely disregarding the reality that is the 0.0000001% chance of someone maybe, just maybe, getting drunk enough that evening to open Visual Studio and actually do anything about them. I don't disagree with you at all, mind you, I just don't care enough.
User avatar
merlin86
Posts: 144
Joined: Tue Jan 29, 2008 4:02 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: nVidia with Vulkan support

Re: XML and/or JSON support

Post by merlin86 »

Then why post?

Have you ever thought about the technical details of such request ? Like could be useful for other things ? Better implement a library for parsing or better write something custom?
How difficult in term of hours / technical ?

Sometimes I think is better do these things in order:

- Have fun with yourself
- Smoke
- Touch the grass

Instead of posting such nonsense

Mods : could we lock this thread ? Thanks :)
Axensus

Re: XML and/or JSON support

Post by Axensus »

>Then why post?
Because the suggestion is still very much valid, snark in OP aside. It's just all the same to me if this gets implemented or not, but not suggesting it in the first place guarantees that it won't be. Something about missing 100% of the shots you don't take and all that.

>Have you ever thought about the technical details of such request ?
Considering there's already some form of JSON processing (Dictionaries), I'd say this is at least mildly possible. XML might be more out of scope. But since I don't plan on implementing this myself, no, I haven't thought about the details. If I had, it's likely because I would have added this myself, in which case this thread would have been completely pointless.

>Like could be useful for other things?
It's called standardization and helps for future-proofing. If file saving is ever added to GZDoom, people could store things in a sensible format. Plus if someone ever wants to read someone else's lump, they wont have to do black magic voodoo and copy the entire bloody parser just to do that.

>Better implement a library for parsing or better write something custom?
Same as above. Also tell me you didn't read the OP without telling me you didn't read the OP. Implementing libraries in GZDoom automatically means the burden of maintaining that falls on YOU, because you essentially copy the entire source code into your project. Writing "something custom" for what an industry standard already works is called reinventing the wheel. I don't want to do that. Call me lazy if you want, I don't mind, I just know it's better for my project in the long run.
User avatar
R4L
Global Moderator
Posts: 419
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: XML and/or JSON support

Post by R4L »

Axensus wrote: Thu Aug 29, 2024 9:09 am >Are you honestly expecting a nice reply to this?
Not really, no. I'm just jaded to the point of simply not caring in the slighest about this engine's future anymore. Been working with it and the wider community's mostly ass-backwards second-grade-workarounds mindset for far longer than what should be considered healthy by international standards. I know this feature suggestion will reach the bottom of the forum and die there regardless of how I word it. Which begs the question of why bother. Answer: just to get it out of my system. Same with bug reports. I report them because I have to sleep at night, completely disregarding the reality that is the 0.0000001% chance of someone maybe, just maybe, getting drunk enough that evening to open Visual Studio and actually do anything about them. I don't disagree with you at all, mind you, I just don't care enough.
See, I think you do care. Why even make this post and reply then?

I have heard other's frustrations with GZDoom's development (PRs sitting in hell just to he disapproved for example), so you aren't alone. Where are you reporting bugs? I'm wondering because the devs quite often tell others where to properly report bugs (most people seem to post them in Discord). Even then, they still sometimes respond to them to let them know what's kind of going on.

I just think if you want someone to actually care and not just brush you off, maybe don't patronize others.
User avatar
Rachael
Posts: 13854
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: XML and/or JSON support

Post by Rachael »

merlin86 wrote: Thu Aug 29, 2024 1:36 pm Mods : could we lock this thread ? Thanks :)
Just what in the heck is that supposed to accomplish? :roll:
R4L wrote: Thu Aug 29, 2024 7:24 pm I have heard other's frustrations with GZDoom's development (PRs sitting in hell just to he disapproved for example), so you aren't alone. Where are you reporting bugs? I'm wondering because the devs quite often tell others where to properly report bugs (most people seem to post them in Discord). Even then, they still sometimes respond to them to let them know what's kind of going on.
I agree and equally feel this way, but there is not much we can do about it. A lot of what happens is they stall for one reason or another, they need to be reviewed by somebody who won't review them, there have been too many times when we do something and get subsequently yelled at and berated for it, which leads to being shy about doing anything at all, even if it really needs to be done.
R4L wrote: Thu Aug 29, 2024 7:24 pm I just think if you want someone to actually care and not just brush you off, maybe don't patronize others.
This is one of the most dangerously underestimated truths.

Now, my opinion about the original suggestion in the OP: I am fully in favor of it, if everything was all golden and good for it I have no idea what it would look like right now, but I think it would benefit the engine.
Axensus

Re: XML and/or JSON support

Post by Axensus »

>Where are you reporting bugs?
The forum. At least when it decides to work and let me post as a guest in the first place. I don't have a Discord or a GitHub account so if an issue is really critical I ask a friend to post it on my behalf on GitHub since there's a greater chance it'll get seen there. But only if it's critical. Everything else I can probably ignore since it's all edge cases these days. Otherwise it all goes here on the forum, as long as the captcha decides it doesn't want to be super busted that day. Seems like it's a permanent issue. Already reported it, but nothing came out of it. If you move this thread to closed feature suggestions, for example, I wouldn't be able to respond anymore. Pretty much the only places I can magically post in are Feature Suggestions and Bugs. But it's all I need anyway.
User avatar
Xeotroid
Posts: 443
Joined: Sat Jun 23, 2012 7:44 am
Graphics Processor: nVidia with Vulkan support
Location: Czech Rep.

Re: XML and/or JSON support

Post by Xeotroid »

JSON support would be nice, yes. I'm not sure why using user-made libraries is a thing to get worked out about, though. The only problem with using user libraries that I can think of is mod collision where both mods use the same library - the mod authors need to make sure to give the classes in their copies of these libraries unique names, which is not great (would code namespaces be a viable suggestion? :twisted:).
The engine itself already uses JSON for storing save games, and its specification is short and simple. For comparison: Here's JSON specification where out of the 14-page document the actual specification only takes up 5 pages, out of which only roughly 3 are text. Here's XML specs, and uh... I can see why some people really don't like XML.

Return to “Feature Suggestions [GZDoom]”