Minimal Object Description Language
MODL (sounds like "doddle") is a compact data serialisation language well suited to storing objects in DNS TXT records.
Let's take a look at an example MODL object, formatted for readability:
Click the JSON tab to see the JSON equivalent.
Similarities with JSON
Like JSON and most other data serialisation languages, MODL is made up of:
- values like
- pairs consisting of a key and value
- maps containing pairs
- arrays containing values
MODL is designed for character efficient data serialisation and does not allow comments.
Subtle differences to JSON
MODL has the following subtle differences when compared to JSON:
- MODL uses an equals (
=) to split a key and value, whereas JSON uses a colon (
- MODL uses a semi-colon (
;) as a separator, whereas JSON uses a comma (
- It is not necessary to quote keys or values – types are inferred
- Values can be quoted using
`graves`as well as
Significant differences to JSON
MODL has the following significant differences when compared to JSON, in the pursuit of character-efficiency:
It is not necessary to split a key and value with
=if the value is a map or an array, e.g:
colours=[red;blue]are both valid MODL
- Pairs can be expressed outside of a map at the top level, where they are considered pairs in the same map
- Pairs can be expressed as values in an array, where each pair is considered an individual map with a single pair
To experiment with MODL use the MODL Playground, to get started on your own project take a look at the Developer Libraries. For detailed information read the Technical Specification.