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

Ignacio Rodríguez nachoel01 en gmail.com
Mar Ene 13 18:38:50 CET 2015


Yo lo haría asi..

http://ur1.ca/jfaqa

Ignacio Rodríguez
nachoel01 en gmail.com
SugarLabs at Facebook
<https://www.facebook.com/pages/SugarLabs/187845102582>

El 13 de enero de 2015, 15:26, Alberto Valverde <alberto en toscat.net>
escribió:

> 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/
>>
>>
>
> _______________________________________________
> 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/2e20fba1/attachment.html>


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