• 65 Posts
  • 691 Comments
Joined 3 years ago
cake
Cake day: June 11th, 2023

help-circle
  • If the XML parser parses into an ordered representation (the XML information set), isn’t it then the deserializer’s choice how they map that to the programming language/type system they are deserializing to? So in a system with ordered arrays it would likely map to those?

    If XML can be written in an ordered way, and the parsed XML information set has ordered children for those, I still don’t see where order gets lost or is impossible [to guarantee] in XML.



  • while JSON is a generalized data structure with support for various data types supported by programming languages

    Honestly, I find it surprising that you say “support for various data types supported by programming languages”. Data types are particularly weak in JSON when you go beyond JavaScript. Only number for numbers, no integer types, no date, no time, etc.

    Regarding use, I see, at least to some degree, JSON outside of use for network transfer. For example, used for configuration files.



  • Kissaki@programming.devOPtoProgramming@programming.devThe lost art of XML — mmagueta
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    edit-2
    2 days ago

    Making XML schemas work was often a hassle. You have a schema ID, and sometimes you can open or load the schema through that URL. Other times, it serves only as an identifier and your tooling/IDE must support ID to local xsd file mappings that you configure.

    Every time it didn’t immediately work, you’d think: Man, why don’t they publish the schema under that public URL.



  • It can be used as alternatives. In MSBuild you can use attributes and sub elements interchangeably. Which, if you’re writing it, gives you a choice of preference. I typically prefer attributes for conciseness (vertical density), but switch to subelements once the length/number becomes a (significant) downside.

    Of course that’s more of a human writing view. Your point about ambiguity in de-/serialization still stands at least until the interface defines expectation or behavior as a general mechanism one way or the other, or with specific schema.


  • The readability and obviousness of XML can not be overstated. JSON is simple and dense (within the limit of text). But look at JSON alone, and all you can do is hope for named fields. Outside of that, you depend on context knowledge and specific structure and naming context.

    Whenever I start editing json config files I have to be careful about trailing commas, structure with opening and closing parens, placement and field naming. The best you can do is offer a default-filled config file that already has the full structure.

    While XML does not solve all of it, it certainly is more descriptive and more structured, easing many of those pain points.


    It’s interesting that web tech had XML in the early stages of AJAX, the dynamic web. But in the end, we sent JSON through XMLHttpRequest. JSON won.



  • There was a time where HTML moved towards a more formalized XML-valid definition named XHTML. Ultimately, web/browser backwards compatibility and messy and forgiving nature lead to us giving up on that and now we have the HTML living standard with rules, but browsers (not sure to what degree it’s standardized or not) are very forgiving in their interpretation.

    While HTML, prior to HTML5, was defined as an application of Standard Generalized Markup Language (SGML), a flexible markup language framework, XHTML is an application of XML, a more restrictive subset of SGML. XHTML documents are well-formed and may therefore be parsed using standard XML parsers, unlike HTML, which requires a lenient, HTML-specific parser.[1]

    XHTML 1.0 became a World Wide Web Consortium (W3C) recommendation on 26 January 2000. XHTML 1.1 became a W3C recommendation on 31 May 2001. XHTML is now referred to as “the XML syntax for HTML”[2][3] and being developed as an XML adaptation of the HTML living standard.[4][5]












  • His comments came as cURL users complained that the move was treating the symptoms caused by AI slop without addressing the cause. The users said they were concerned the move would eliminate a key means for ensuring and maintaining the security of the tool.

    A single user commented, and they responded. “users complained” and “the users” is wrong. implying something different.

    “users complained” feels like a misrepresentation to me as well, at least how I read and understand “complained”. The user wrote “As a security researcher, this is honestly painful to see, but also completely understandable.” Is it complaining if they understand the act and change?

    In a separate post on Thursday, Stenberg wrote: “We will ban you and ridicule you in public if you waste our time on crap reports.”

    The linked separate post is a /.well-known/security.txt file. It’s not really a “separate post”. And I don’t see where they got the date from. Maybe from whatever linked to that in the first place.

    An update to cURL’s official GitHub account made the termination, which takes effect at the end of this month, official.

    Isn’t that from the merge request, which is not merged yet? It’s definitely not in the main branch. Current MR state is something different. The MR discussion clearly states that they will merge on 26th - no early.

    “an update to the official GitHub account” makes no sense to me in the first place, when it’s a file in a repo, not even the account.


    At first, I only wanted to point out one thing. Now this whole article feels like AI slop. Dunno how warranted that feeling/assessment is. Is it sloppy reporting? Am I, as a reader, the problem?

    /edit: The bleeping computer article posted in the community is much better/consistent/coherent. Of course, this one was earlier and already has traction.