[Python-es] problemas con json, agregar o quitar elementos.

Alberto Valverde alberto en toscat.net
Mar Ene 13 18:26:43 CET 2015


Decodifica el json, añade la nueva llave al diccionario resultante y vuelve
a codificarlo.

2015-01-13 18:20 GMT+01:00 Nicolas lino <nicolaslino1 en gmail.com>:

>
>
> Hola gente, tengo una duda:
>
> Teniendo el siguiente modelo de json
>
> {"0":[{"root":"path","movi":"the movi","uri_subtitle":"http://sarasa"}],"1":[{"root":"path","movi":"the
> movi","uri_subtitle":"http://sarasa"}]}
>
> Como hago para agregar {"2":[{"root":"path","movi":"the
> movi","uri_subtitle":"http://sarasa"}]}?
>
>
> Estoy usando la libreria json. Tampoco se si es la mejor para esto.
>
>
> Muchas gracias!
>
> _______________________________________________
> Python-es mailing list
> Python-es en python.org
> https://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/
>
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://mail.python.org/pipermail/python-es/attachments/20150113/62fcd6bf/attachment.html>


Más información sobre la lista de distribución Python-es