Basic JSON question: Do I really need the quotes

rusi rustompmody at gmail.com
Fri Oct 12 23:30:47 EDT 2012


On Oct 13, 5:03 am, Roy Smith <r... at panix.com> wrote:
> In article <cbd2f125-38ca-4f46-9077-95de0cf7ea6f at googlegroups.com>,
>
>  moo... at yahoo.co.uk wrote:
> > I need to define some configuration in a file that will be manually created.
> > [...]
> > json seemed a quick an easy way of achieving this
>
> JSON would not be my first choice for a file which needs to be
> maintained by hand.
>
> I've only recently started using a system that has YAML config files.
> I've quickly become enamored of the format for config files.  I don't
> know if it's capable of expressing everything you can with JSON, but it
> certainly can do anything you would reasonably want to put in a config
> file, it's easy to read, and easy to hand-edit.

Yaml is a superset of json http://en.wikipedia.org/wiki/YAML#JSON

I find it a bit mysterious: yaml's structure-via-indentation
philosophy makes it more in line with python than most other modern
languages. And yet its the ruby community that seems to most eagerly
embrace yaml. Specially ironic given that ruby's syntax is reminiscent
of Pascal -- statements dont just close with '}' but with 'end'



More information about the Python-list mailing list