[Python-de] problem json string zu dekodieren....

Andreas Jung lists at zopyx.com
Mi Mai 14 11:49:53 CEST 2014


Warum nimmst Du nicht einfach einen Editor und schaust was in Zeile 1,
Spalte 108 genau seht?
Genau dafür gibt es exakte Fehlermeldungen!?

-aj


Am 14. Mai 2014 10:51 schrieb Tamer Higazi <th982a at googlemail.com>:

> Hi Leute!
>
> Ich habe ein Problem ein JSON String zu dekodieren, und weiß nicht wie
> dieses Problem zu lösen ist.
>
>
>
>
> from json.decoder import JSONDecoder
>
> #Mein JSON String
>
> myjs =
>
> '{"AVName":"Tamer","ANName":"Higazi","AAnschrift":"Bauerngasse","AHausnr":"1","APLZ":"55116","AOrt":"Mainz"},{"KontaktTel":["01234","11223344"],{"ZahlungsArt":"0"},{"ZugangsDaten":["
> tamer.higazi at nomail.com","mypass"]}'
>
>
>
>
> JSD = JSONDecoder()
> rsx = JSD.decode(myjs)
>
>
> erhalte ich diese Fehlermeldung:
>
> >>> JSD.decode(myjs)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib64/python2.7/json/decoder.py", line 368, in decode
>     raise ValueError(errmsg("Extra data", s, end, len(s)))
> ValueError: Extra data: line 1 column 108 - line 1 column 220 (char 107
> - 219)
>
>
>
> Hat jemand von euch ne Idee ?!
>
>
>
> Danke.
>
>
>
>
> Tamer
> _______________________________________________
> python-de maillist  -  python-de at python.org
> https://mail.python.org/mailman/listinfo/python-de
>
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://mail.python.org/pipermail/python-de/attachments/20140514/4dd55aaf/attachment.html>


Mehr Informationen über die Mailingliste python-de