On 15/03/2011 19:56, Aaron wrote:
If I print authreq_data to screen  I get

{"req": {"username": "######", "password": "#####", "productType": "CFD_Demo"}}

Essentially I want the inner brackets to be  [ ] instead of {} but alternating 
on each level so it would be:

{"req": [{"username": "######", "password": "#####", "productType": 
"CFD_Demo"}]}

as per usual json.

{... } designates a dict and [...] designates a list.

If you give json the correct structure then it will give you want you
want.

This is a dict:

{"req": [{"username": "######", "password": "#####", "productType": "CFD_Demo"}]}

The value for the key "req" is a list:

[{"username": "######", "password": "#####", "productType": "CFD_Demo"}]

which contains a dict:

    {"username": "######", "password": "#####", "productType": "CFD_Demo"}
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to