Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46378

Re: detect key conflict in a JSON file

References <mailman.2347.1369826248.3114.python-list@python.org> <roy-5C9415.09253929052013@news.panix.com>
From Jabba Laci <jabba.laci@gmail.com>
Date 2013-05-29 15:41 +0200
Subject Re: detect key conflict in a JSON file
Newsgroups comp.lang.python
Message-ID <mailman.2357.1369834941.3114.python-list@python.org> (permalink)

Show all headers | View raw


> The real answer here is that JSON is probably not the best choice for
> large files that get hand-edited.  For data that you intend to hand-edit
> a lot, YAML might be a better choice.
>
>> Currently the value of the second key silently overwrites the value of
>> the first.

Thanks but how would it be different with YAML? Can YAML check duplicate keys?

How to process (read) YAML files in Python? Can you give me some hints
how to get started? All I need is read it in and create a dictionary
of it.

Thanks,

Laszlo

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

detect key conflict in a JSON file Jabba Laci <jabba.laci@gmail.com> - 2013-05-29 13:16 +0200
  Re: detect key conflict in a JSON file Roy Smith <roy@panix.com> - 2013-05-29 09:25 -0400
    Re: detect key conflict in a JSON file Jabba Laci <jabba.laci@gmail.com> - 2013-05-29 15:41 +0200
      Re: detect key conflict in a JSON file rusi <rustompmody@gmail.com> - 2013-05-29 07:36 -0700
    Re: detect key conflict in a JSON file Ervin Hegedüs <airween@gmail.com> - 2013-05-29 16:04 +0200
    Re: detect key conflict in a JSON file Roy Smith <roy@panix.com> - 2013-05-29 11:20 -0400
      Re: detect key conflict in a JSON file Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-30 03:10 +0000

csiph-web