Convert YAML to INI

Turn YAML files into INI. Top-level objects become [sections] and plain top-level values come first, and an object inside a section becomes its own section named with a dot, such as [server.tls].

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop YAML files on the dialor turn it to pick what to do

YAML settings as an INI file.Objects become sections, and nested objects get dotted names.

  1. What you get

    One INI file. Plain top-level values come first, and each top-level object becomes a [section] of key and value pairs. An object inside a section becomes its own section named with a dot, such as [server.tls].

    A list becomes a repeated key, one line for each item.

  2. Lists and top-level lists

    An empty list disappears, because there is no item to write. Objects or lists inside a list are written as JSON text.

    A top-level list becomes one section per entry, numbered from 0 under items, such as [items.0]. An entry that is not an object goes under the key value.

    A file with several documents is treated as a list.

  3. What changes

    Comments are dropped. Aliases are expanded, so each place that used one gets its own copy of the value.

    Values such as yes, on, 0755 and dates stay text. A merge key (<<) is kept as an ordinary key instead of being merged.

  4. When it stops

    The conversion stops with input_corrupted when the file could not be parsed. It stops with unsupported_elements when the file holds something INI cannot carry, or when some inputs cannot become the format the join takes.

    To go the other way, use INI to YAML.

YAML and INI.What each format is.

The formats

From · YAML

YAML

YAML configuration and data files.

Extensions
.yaml .yml
MIME type
application/yaml
Kind
Text and data
To · INI

INI

Sections of key and value pairs, the settings format of Windows and many tools.

Extensions
.ini .cfg
MIME type
text/x-ini
Kind
Text and data

In your code.The same YAML to INI conversion through the API, for your app or your agent.

terminal
$ cv convert report.yaml report.ini
$ cv convert report.yaml report.ini

Questions.What people ask about YAML to INI.

01OF 04

An object inside a section becomes its own section named with a dot, such as [server.tls].

A list becomes a repeated key. An empty list disappears, and objects or lists inside a list are written as JSON text.

No. Comments are dropped.

No. A merge key (<<) is kept as an ordinary key instead of being merged.

More conversions.Other ways in and out of YAML and INI.