User-readable file format for python list of lists -


i'm considering using user-readable file format python app. right i'm using pickle store data in binary. i'm not sure if xml or json way go file contains list of lists looks this:

[1, 'the name of set', [[1, 'data1', 'data2'],[2,'data3','data4']] 

the list hold other lists containing strings can have multiple items (even hundreds). basically, i'd have has easy interface convert to/from python list , need integers stay integers.

that's literal json. json's popular format out there, , it's hard argue legibility.

in [105]: my_list = [1, 'the name of set', [[1, 'data1', 'data2'],[2,'data3','data4']]] in [106]: my_list == json.loads(json.dumps(my_list)) out[106]: true 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -