[LRUG] On json and yaml

Rory Sinclair rory at asmallworld.net
Tue Apr 29 08:52:06 PDT 2014


Yep, agree totally - JSON is better for all sorts of reasons, including interchange etc.

--  
Rory Sinclair
Head of Technology
ASMALLWORLD


On Tuesday, 29 April 2014 at 16:49, Gabe da Silveira wrote:

> On Tue, Apr 29, 2014 at 4:36 PM, Graham Ashton <graham at effectif.com (mailto:graham at effectif.com)> wrote:
> > I agree, but I’d definitely choose JSON. I think it’s less likely to change in an incompatible manner with the passage of time.
> >  
> > I’ve been bitten by supposedly standard serialisation formats evolving in ways that break when read by updated code several times over the years (and one of those formats was Yaml, when a syntax change meant I had to use an old version of Ruby when releasing gems for the best part of a year).
>  
> Wise words these.  Taking a gander at the YAML spec ought to give any software engineer serious pause.  It is an amazingly powerful language, but I would only use it if all the above are true:  
>  
> * The only code that needs to access it is ruby, YAML is not as well supported and not as powerful with languages other than ruby
> * I really need the rich features of YAML such as being able to serialize ruby objects.
> * I am never editing it by hand as there are terrible things that you will never see coming, like, try running this in an irb and weep in horror:
>  
> YAML.load("  FI: Finland\n  NO: Norway\n  SE: Sweden")
>  
> JSON is well-defined, simple and relatively terse.  Use it if you can.  
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org (mailto:Chat at lists.lrug.org)
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20140429/56f4aa23/attachment.html>


More information about the Chat mailing list