This tutorial covers the essentials of toml file overview ..
What is a TOML?
TOML is abbreviated as Tom’s Obvious, Data format serialization language and it is a new file format. It is used for specifying data in configurations similar to YAML . Usually each software or application has some configuration data, Before TOML format exists, We used to have property file with key and value pairs like key=value.The property files are not suitable when there is complex structure of configuration. TOML is suitable for representing data in hashtable format and easy to read and write the data using various programming languages.
Advantages of TOML
- It is human readable for complex configuration and settings
- Supports Comments
- Gain more popularity than other file formats
- Read and write capabilities
- content of this files looks like windows init format
Disadvantages of TOML
- Numbers like NAN and infinity are not supported
- No support for binary data
- Only supports few data types, not extendable
TOML use cases
- TOML can be used in many type projects for different purposes
- Configuration and settings of the software applications
TOML file extension
TOML document grouped in a file with extension toml, You can use any IDE or text editor to open this file.
All the popular IDE supports the toml file extension and also provides plugins to validate the toml file content
- data in toml files are case sensitive
- file supports UTF-8 encoding format only
- Supports whitespaces, tabs and newlines asci code
MIME format type - application/toml
MIME is abbreviated as Multipurpose Internet Mail Extensions which is a format specified in request and response that is transferred between client and server across internet. Content-Type and accept headers in a request object are specified with this format following is the mime type for this documents
and request contains the below value for toml data sending over the internet
Content-type : application/toml