dom_toml.encoder
¶
Source code: dom_toml/encoder.py
Dom’s custom encoder for Tom’s Obvious, Minimal Language.
New in version 0.2.0.
Classes:
|
Customised TOML encoder which wraps long lists onto multiple lines and adds a blank line before arrays of tables. |
-
class
TomlEncoder
(_dict=<class 'dict'>, preserve=False)[source]¶ Bases:
TomlEncoder
Customised TOML encoder which wraps long lists onto multiple lines and adds a blank line before arrays of tables.
Changed in version 0.2.0: Moved from
__init__.py
Methods:
dump_inline_table
(section)Preserve an inline table in its compact syntax instead of expanding into sections.
dump_list
(v)Serialize a list to TOML.
dump_sections
(o, sup)Serialise a dictionary into TOML sections.