How do I serialize a Python dictionary into a string, and then back to a dictionary?

前端 未结 8 1023
我在风中等你
我在风中等你 2020-11-29 20:46

How do I serialize a Python dictionary into a string, and then back to a dictionary? The dictionary will have lists and other dictionaries inside it.

8条回答
  •  無奈伤痛
    2020-11-29 21:40

    pyyaml should also be mentioned here. It is both human readable and can serialize any python object.
    pyyaml is hosted here:
    https://bitbucket.org/xi/pyyaml

提交回复
热议问题