]> Sergey Matveev's repositories - stargrave-blog.git/commitdiff
Забавное в YAML
authorSergey Matveev <stargrave@stargrave.org>
Thu, 3 Sep 2020 06:38:41 +0000 (09:38 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 3 Sep 2020 06:38:41 +0000 (09:38 +0300)
https://hitchdev.com/strictyaml/why/implicit-typing-removed/

    countries:
    - GB
    - IE
    - FR
    - DE
    - NO

после парсинга станут: {'countries': ['GB', 'IE', 'FR', 'DE', False]}
Что разрабам YAML Норвегия сделала?

    python: 3.5.3
    postgres: 9.3

станут: [{"python": "3.5.3", "postgres": 9.3}]
Но этот вариант с ходу понятен почему к такому приводит.

    first name: Christopher
    surname: Null

станет: {"first name": "Christopher", "surname": None}
Хитрый Кристофер Нулл!

Всех этих проблем, кстати, нет в StrictYAML диалекте.


No differences found