Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Human readable/writable serialization alternatives to YAML and XML ?

by Porculus (Hermit)
on Mar 07, 2009 at 09:13 UTC ( #749024=note: print w/replies, xml ) Need Help??


in reply to Human readable/writable serialization alternatives to YAML and XML ?

Is XML all that bad? Sure, a lot of people have an irrational hatred of it, but there are lots of things that people hate, and that doesn't mean they're dreadful. One reason so many people criticise XML is that it's so widely used -- more people are familiar with XML than have even heard of YAML. (And, dare I say it, some of the people* extolling the virtues of JSON are trend-followers who regularly claim that whatever they learned about most recently is the bestest thing ever.)

The advantage of XML, from the point of view of a human trying to work with it directly, is that you can get validating editors that will flag up any mistakes as you type them. Typo in a tag name? A good XML editor will flag it up and may even be able to fix it automatically. If you're using YAML, JSON, etc, then the first thing you'll know about it is when your program chokes on the invalid input.

* I'm referring to the wider Internet here, not the people commenting in this thread -- all the people posting here so far are clearly familiar with all the options and are presenting informed opinions.

  • Comment on Re: Human readable/writable serialization alternatives to YAML and XML ?

Replies are listed 'Best First'.
Re^2: Human readable/writable serialization alternatives to YAML and XML ?
by BrowserUk (Pope) on Mar 07, 2009 at 11:52 UTC
    The advantage of XML, ... is that you can get validating editors that will flag up any mistakes as you type them.

    You can view that the other way around. XML is so complex and verbose, that you need special, validating editors.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^2: Human readable/writable serialization alternatives to YAML and XML ?
by cutlass2006 (Pilgrim) on Mar 09, 2009 at 07:25 UTC

    For pure serialization, XML starts looking like a bad choice compared to YAML and JSON, but if you want to do anything more then serialization then XML starts winning ... the closer the data you are encoding starts looking like a document then YAML and JSON lose.

    XML is better as a general purpose format and I tend to choose general solutions if what I am building has a lot of volatility in its requirements. I see JSON and YAML as a natural optimisation to be considered nearer the end of development versus considering them as architectural 'pillars' of a solution ... and yes I would rather lose in terms of speed of development upfront and manage 'near future' requirements then use YAML/JSON because its fractionally quicker then XML to work with.

    I think the main problem is using XML everywhere when its power will never be needed ... basic config files are the main culprit here.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://749024]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2021-04-17 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?