[LRUG] On json and yaml
Najaf Ali
ali at happybearsoftware.com
Tue Apr 29 08:54:36 PDT 2014
I have no opinion either way in this particular use case (but would defer
to those who've had more experience above), but I do know that if Rails
used JSON to serialise session cookies by default I'd only be running
half-day security workshops.
On Tue, Apr 29, 2014 at 4:52 PM, Rory Sinclair <rory at asmallworld.net> wrote:
> 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>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
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>
>
> _______________________________________________
> Chat mailing list
> 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/32b90acf/attachment-0003.html>
More information about the Chat
mailing list