cjson 1.0.5 keyword argument

Guilherme Polo ggpolo at gmail.com
Sun Sep 14 10:45:20 EDT 2008


On Sun, Sep 14, 2008 at 10:33 AM, Clodoaldo <clodoaldo.pinto at gmail.com> wrote:
> I have installed cjson 1.05 in Fedora 8 (python 2.5.1).
>
> The cjson home page shows a keyword argument "encoding".
> http://python.cx.hu/python-cjson/
>

The latest python-cjson on that page is 1.0.3, which accepts keywords
for the encode function. python-cjson 1.0.5 no longer accepts.

> When i use it i get an error:
>
>>>> cjson.encode('é', encoding='utf8')
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> TypeError: encode() takes no keyword arguments
>
> What am i missing? There is no mail list for cjson.

Try doing cjson.encode('é'.decode('utf-8')) instead.

>
> Regards, Clodoaldo
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
-- Guilherme H. Polo Goncalves



More information about the Python-list mailing list