Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46367
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.134.4.91.MISMATCH!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <jabba.laci@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.014 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'example:': 0.03; 'detect': 0.07; 'json': 0.07; 'subject:file': 0.07; 'key.': 0.09; 'subject:key': 0.16; 'thanks,': 0.17; 'first.': 0.19; 'command': 0.22; 'second': 0.26; 'message-id:@mail.gmail.com': 0.30; 'file': 0.32; 'received:google.com': 0.35; 'hi,': 0.36; 'growing': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'manually': 0.60; 'happen': 0.63; 'repeat': 0.74; 'silently': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=DluQ18qa3DHb1oLzfE+Ny3Bemo9qppePzfJ2e+qt47I=; b=LFH3kLGeDKjkOk7oeYYocTi0ItKocqm2JA26fXmcgK2i1xOkZAnJ3vvCVehZJh7aAF VBOkP+e3ou/K3TYNHI6ry/KH5dx0HO8CrUlmZjMPQL1PKiW5Ul5/DPIN1Iv58w3tHA9v 0V/Kykzn/zxx8/mRVu0IQ/Wo90iNj3RyqzMNqrVpz1ZzkfBn6SKps//wfD65cU9VF3oW pJewSlnXmr1j5MJ1lTk5MA+ztv6BedRFpmUSN1lAIoJHxrMNZtrSjUmR2QW0Q1aQ6Evo stDVNs1tjR9XiZS/LgoD7KF5j8+fvCVvShYBNeDSHBuq9UUFUoGXYpQofMcff3Zi3HNq unnQ== |
| X-Received | by 10.204.224.135 with SMTP id io7mr617199bkb.46.1369826240699; Wed, 29 May 2013 04:17:20 -0700 (PDT) |
| MIME-Version | 1.0 |
| From | Jabba Laci <jabba.laci@gmail.com> |
| Date | Wed, 29 May 2013 13:16:59 +0200 |
| Subject | detect key conflict in a JSON file |
| To | Python mailing list <python-list@python.org> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2347.1369826248.3114.python-list@python.org> (permalink) |
| Lines | 20 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1369826248 news.xs4all.nl 15991 [2001:888:2000:d::a6]:50422 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:46367 |
Show key headers only | View raw
Hi,
How can you detect if a key is duplicated in a JSON file? Example:
{
"something": [...],
...
"something": [...]
}
I have a growing JSON file that I edit manually and it might happen
that I repeat a key. If this happens, I would like to get notified.
Currently the value of the second key silently overwrites the value of
the first.
Do you know about a command line JSON validator?
Thanks,
Laszlo
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll 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