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


Groups > comp.lang.python > #72074

Re: Verify JSON Data

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.022
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'installed.': 0.07; 'json': 0.07; 'cc:addr:python-list': 0.11; '127': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'patches': 0.16; 'wrote:': 0.18; 'result.': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'source': 0.25; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'checking': 0.33; 'core': 0.34; "i'd": 0.34; 'received:google.com': 0.35; 'version': 0.36; 'system,': 0.38; 'tell': 0.60; 'numbers': 0.61; 'old,': 0.85; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=emKalmhaW/ny946joA8+eQR7j6gx3VEdB7QMDrMed/4=; b=emBVkZYG9AnRwVl+dUYLDH1f8BTJY8prNL+2hFFn4+ChZd1rYufGWrpxn8OHkv9dM/ T9Nhp0c0CZdN91Zxlhlx+3VixE2JF4bcWbuPxN54bAdYGx5W+piISpK+MhVR9OtJ5dTo OllU/zRHZSWRD07jYCVo9WCkM90rrtNQuG7dRdBGz6MjQnLCF+msKU8GRL8QlvJxWbRN wTYmNsKlhmctDDvivb7CKuSEd4bMjtH2R3l6GEDxtRJmlJrd6tIHGAQX3Ov7sSO5Oqk7 kzt+kJRNgyCXMOgg0mJnYrSOTfWTNaWVn71qEVpTv8nfJscx8JSJWujXCjk1tqLg3hUQ utIQ==
MIME-Version 1.0
X-Received by 10.52.93.201 with SMTP id cw9mr909754vdb.80.1401119887029; Mon, 26 May 2014 08:58:07 -0700 (PDT)
In-Reply-To <201405261137.10750.gheskett@wdtv.com>
References <e26d3f14-ac97-4abd-bdfc-699d9ed2175c@googlegroups.com> <roy-CA8FC6.11195326052014@news.panix.com> <201405261137.10750.gheskett@wdtv.com>
Date Tue, 27 May 2014 01:58:06 +1000
Subject Re: Verify JSON Data
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.10348.1401119895.18130.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1401119895 news.xs4all.nl 2924 [2001:888:2000:d::a6]:34695
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:72074

Show key headers only | View raw


On Tue, May 27, 2014 at 1:37 AM, Gene Heskett <gheskett@shentel.net> wrote:
> Just for S&G, and without checking the version numbers of anything, this
> may not be all that bulletproof a test:
>
> gene@coyote:~$ echo '[1, 2, 3]' | json_xs -t null 2>/dev/null; echo $?
> 127
> gene@coyote:~$ echo '[1; 2, 3]' | json_xs -t null 2>/dev/null; echo $?
> 127
>
> Old, buntu 10.04.4 LTS system, all up to date security patches wise.
> kernal 3.13.9, PAE on a quad core phenom.
>
> Interesting result.  Source of error? DamnedifIknow.
>

Return value 127 might well mean that json_xs isn't installed. It's
very difficult for a non-program to tell you whether JSON is valid or
not :) So I'd be checking 'which json_xs' before continuing.

ChrisA

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


Thread

Verify JSON Data gaurangnshah@gmail.com - 2014-05-26 07:26 -0700
  Re: Verify JSON Data Roy Smith <roy@panix.com> - 2014-05-26 11:19 -0400
    Re: Verify JSON Data Gene Heskett <gheskett@shentel.net> - 2014-05-26 11:37 -0400
      Re: Verify JSON Data Roy Smith <roy@panix.com> - 2014-05-26 11:55 -0400
        Re: Verify JSON Data Chris Angelico <rosuav@gmail.com> - 2014-05-27 02:02 +1000
        Re: Verify JSON Data Gene Heskett <gheskett@shentel.net> - 2014-05-26 12:43 -0400
    Re: Verify JSON Data Chris Angelico <rosuav@gmail.com> - 2014-05-27 01:58 +1000
    Re: Verify JSON Data Chris Angelico <rosuav@gmail.com> - 2014-05-27 02:00 +1000
  Re: Verify JSON Data Burak Arslan <burak.arslan@arskom.com.tr> - 2014-05-26 17:28 +0200
  Re: Verify JSON Data Denis McMahon <denismfmcmahon@gmail.com> - 2014-05-26 15:43 +0000
  Re: Verify JSON Data Gene Heskett <gheskett@shentel.net> - 2014-05-26 12:44 -0400
  Re: Verify JSON Data Grant Edwards <invalid@invalid.invalid> - 2014-05-26 18:35 +0000
    Re: Verify JSON Data Rustom Mody <rustompmody@gmail.com> - 2014-05-26 21:28 -0700

csiph-web