Monday 19 September 2022

Introduction to TOML

TOML is designed to be a minimal configuration file format for humans.

 

TOML is easy to read and parse in a programming languages. You can get all the supported languages here (https://github.com/toml-lang/toml/wiki).

 

At the time of writing this tutorial, TOML is supporting following types.

 

a.   Key/Value Pairs

b.   Arrays

c.    Tables

d.   Inline tables

e.   Arrays of tables

f.     Integers & Floats

g.   Booleans

h.   Dates & Times, with optional offsets

 

Is TOML case sensitive?

As per the TOML specification 1.0, TOML is case sensitive.

 

Points to remember while working with TOML

a.   A TOML file must be a valid UTF-8 encoded Unicode document.

b.   Whitespace means tab (0x09) or space (0x20).

c.    Newline means LF (0x0A) or CRLF (0x0D 0x0A).

d.   TOML is case sensitive

 


 

All the examples of this tutorial can be downloaded from here.


 

References

https://toml.io/en/

https://toml.io/en/v1.0.0

 

 

 

Previous                                                 Next                                                 Home

No comments:

Post a Comment