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


Groups > comp.lang.python > #71543

Re: problems decoding json objects

References <53732AFB.8080204@googlemail.com>
Date 2014-05-14 05:39 -0500
Subject Re: problems decoding json objects
From Skip Montanaro <skip@pobox.com>
Newsgroups comp.lang.python
Message-ID <mailman.9998.1400063958.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, May 14, 2014 at 3:36 AM, Tamer Higazi <th982a@googlemail.com> wrote:
> myjs =
> '{"AVName":"Tamer","ANName":"Higazi","AAnschrift":"Bauerngasse","AHausnr":"1","APLZ":"55116","AOrt":"Mainz"},{"KontaktTel":["01234","11223344"],{"ZahlungsArt":"0"},{"ZugangsDaten":["tamer.higazi@nomail.com","mypass"]}'

Following up on Ben's comment, what did you expect? With my Python hat
on, I'd say you've got a string representing a tuple of four
dictionaries, though my human brain can see past the missing '}' which
is supposed to close the second dict. If you add that, it's still not
valid JSON (I guess JSON doesn't have tuples). This stuff isn't meant
to be typed by humans. Instead computers are supposed to barf it out
and munch on it. As Ben indicated, putting it in a string is
pointless. Might as well just define the dictionaries yourself.

not-gonna-mention-eval-ly, y'rs

Skip

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


Thread

Re: problems decoding json objects Skip Montanaro <skip@pobox.com> - 2014-05-14 05:39 -0500
  Re: problems decoding json objects Roy Smith <roy@panix.com> - 2014-05-14 07:43 -0400

csiph-web