grmpyprogrammer,
@grmpyprogrammer@phpc.social avatar

When it comes to the anti-XML discussion — readability is an opinion, not a fact. A lot of what programmers claim are facts are just opinions.

I am sorry you dislike XML. I remain unconvinced that using JSON or YAML over it is anything other than a personal preference born out of your chosen programming community’s tribalism.

Sundruid,

@grmpyprogrammer I find the AI models do extremely well with json and you can additionally cram a bunch of different data into the same json file and still completely utilize it esp in AI environments. Obvious reason is that the field name is attached to every data field.

xurxo,
@xurxo@mastodon.social avatar

@grmpyprogrammer umm, probably thinking about one option for everything, not consodering the use case, the data structure, is a mistake. If you are transmitting ojects and programming variables, etc., Non critical data, between homogeneous layers, simple api calls JSon is great. If you are managing critical data, complex content or encoding complex configurations it is probably an xml case IMO. The readability also, xml may be more apropriate for complex content, mixed data, etc.

channelOwen,
@channelOwen@fosstodon.org avatar

@grmpyprogrammer I'm not trying to change your mind; but if you added a Schema to JSON, would it be less bad? This is what @ocramius [of many Types] does.

grmpyprogrammer,
@grmpyprogrammer@phpc.social avatar

@channelOwen Schemas are always good

ravetracer_22,
@ravetracer_22@phpc.social avatar

deleted_by_author

  • Loading...
  • ocramius,
    @ocramius@mastodon.social avatar

    @ravetracer_22 @grmpyprogrammer @heiglandreas ye, and the NodeJS ecosystem has almost zero XML support as a legacy of what Grmpy said: irrational dislike of stable standards 🤷‍♀️

    serge,
    @serge@babka.social avatar

    @grmpyprogrammer

    > I remain unconvinced that using JSON or YAML over it is anything other than a personal preference born out of your chosen programming community’s tribalism.

    What sort of evidence might convince you, in either/any direction?

    asgrim,
    @asgrim@phpc.social avatar

    @grmpyprogrammer I'm a big fan of XML tbh, and not ashamed of that 😙

    Schrank,
    @Schrank@phpc.social avatar

    @asgrim @grmpyprogrammer as a Child I’m all I’m on , although I get used to yaml and json thanks to and .

    TL;DR use what ever format makes you happy, I make it work for you.

    (Please don’t start to pack json into xml into yaml or something like this shit!)

    bmaxv,
    @bmaxv@noc.social avatar

    @grmpyprogrammer

    I got linked this very helpful reference for why is awful:

    https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell

    gmazzap,
    @gmazzap@phpc.social avatar

    @grmpyprogrammer When you need to access data from both PHP and JS, then JSON is the only format that is natively consumable from both languages.
    That is a fact.
    I personally dislike JSON, but it does not mean in such cases I'm going to use XML or anything else and rely on userland 3rd party libs when parsing JSON is a native function away in both PHP and JSON.

    grmpyprogrammer,
    @grmpyprogrammer@phpc.social avatar

    @gmazzap That scenario seems correct to me. I wouldn’t advocate trying to get JS code to parse XML.

    riwe,
    @riwe@det.social avatar

    @grmpyprogrammer
    INI files FTW!

    gizmomathboy,
    @gizmomathboy@mastodon.xyz avatar

    @grmpyprogrammer my personal "problem" with xml is verbosity.

    And probably folks not using a dtd.

    I can't remember where or when I learned about them, they seemed to solve many of the problems I saw people having with xml

    I still prefer yaml but I'm not an ass about it

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • kavyap
  • InstantRegret
  • ethstaker
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • tacticalgear
  • slotface
  • Durango
  • khanakhh
  • rosin
  • everett
  • Leos
  • vwfavf
  • normalnudes
  • osvaldo12
  • cubers
  • GTA5RPClips
  • cisconetworking
  • ngwrru68w68
  • anitta
  • provamag3
  • tester
  • modclub
  • megavids
  • JUstTest
  • All magazines