相关疑难解决方法(0)

将YAML文件转换为Python JSON对象

如何加载YAML文件并将其转换为Python JSON对象?

我的YAML文件如下所示:

Section:
    heading: Heading 1
    font: 
        name: Times New Roman
        size: 22
        color_theme: ACCENT_2

SubSection:
    heading: Heading 3
    font:
        name: Times New Roman
        size: 15
        color_theme: ACCENT_2
Paragraph:
    font:
        name: Times New Roman
        size: 11
        color_theme: ACCENT_2
Table:
    style: MediumGrid3-Accent2
Run Code Online (Sandbox Code Playgroud)

python json yaml python-3.x

11
推荐指数
4
解决办法
1万
查看次数

标签 统计

json ×1

python ×1

python-3.x ×1

yaml ×1