OpenIndented Markup Language
An indented, easy-to-parse, easy-to-read, easy-to-write markup language.
Home FAQ ImplementationA taste of OIML
Comment
// comment needs to be in their own lines.
Single string
: This is a string
Equivalent JSON
[{"B": "This is a string"}]
A list of strings
: This is a string : This is another string
Equivalent JSON
[ {"B": "This is a string"}, {"B": "This is another string"} ]
String with additional attributes
: This is a string font-family: Times New Roman size: 14pt text-style: italic
Equivalent JSON
[ {"B": "This is a string", "C": [ {"A": ["font-family"], "B": "Times New Roman"}, {"A": ["size"], "B": "14pt"}, {"A": ["text-style"], "B": "italic"} ]} ]
String with a chain of attributes
: This is a string attr1: attr-content attr2: attr2-content attr3: attr3-content
Equivalent JSON
[ {"B": "This is a string", "C": [ {"A": ["attr1"], "B": "attr-content", "C": [ {"A": ["attr2"], "B": "attr2-content", "C": [ {"A": ["attr3"], "B": "attr3-content"} ]} ]} ]} ]
Three strings & a boolean (in a different arrangement)
// this, too, is an array of 4 elements (#true is the boolean value "true") // the difference between this and the list of strings started with // colon ":" will become apparent later. trust me. str1 str2 #true str3
Equivalent JSON
[ {"A": ["str1", "str2", true, "str3"]} ]
Single number
42
Equivalent JSON
[ {"A": [42]} ]
A list of numbers
42 69 -4.20e3 810 191.9 114514
Equivalent JSON
[ {"A": [42]}, {"A": [69]}, {"A": [-4.20e3]}, {"A": [810]}, {"A": [191.9]}, {"A": [114514]} ]
Number with additional attributes
-42: type: expense desc: office stationary
Equivalent JSON
[ {"A": [-42], "C": [ {"A": ["type"], "B": "expense"}, {"A": ["desc"], "B": "office stationary"} ]} ]
Simple mapping
Name: Juan Lopez Age: 21 Major: Accounting
Equivalent JSON
[ {"A": ["Name"], "B": "Juan Lopez"}, {"A": ["Age"], "B": "21"}, {"A": ["Major"], "B": "Accounting"} ]
A list of objects
User: jlopez Name: Juan Lopez Age: 21 Major: Accounting User: marias Name: Maria Smith Age: 19 Major: Computer science User: djesse4 Name: Jesse Collier Age: 22 Major: Music
Equivalent JSON
[ {"A": ["User"], "B": "jlopez", "C": [ {"A": ["Name"], "B": "Juan Lopez"}, {"A": ["Age"], "B": "21"}, {"A": ["Major"], "B": "Accounting"} ]}, {"A": ["User"], "B": "marias", "C": [ {"A": ["Name"], "B": "Maria Smith"}, {"A": ["Age"], "B": "19"}, {"A": ["Major"], "B": "Computer science"} ]}, {"A": ["User"], "B": "djesse4", "C": [ {"A": ["Name"], "B": "Jesse Collier"}, {"A": ["Age"], "B": "22"}, {"A": ["Major"], "B": "Music"} ]} ]
Key-value pair
user type=admin: adam FullName: Adam Murray Email: adam.murray45@gmail.com
Equivalent JSON
[ {"A": ["User", ["type", "admin"]], "B": "adam", "C": [ {"A": ["FullName"], "B": "Adam Murray"}, {"A": ["Email"], "B": "adam.murray45@gmail.com"} ]} ]
Longer examples
Click here for longer examples
A GitLab CI example in OIML:variables: // DJANGO_CONFIG: "test" MYSQL_DATABASE: $MYSQL_DB MYSQL_ROOT_PASSWORD: $MYSQL_PASS MYSQL_USER: $MYSQL_USER MYSQL_PASSWORD: $MYSQL_PASS default: image: ubuntu:20.04 // Pick zero or more services to be used on all builds. // Only needed when using a docker container to run your tests in. // Check out: https://docs.gitlab.com/ee/ci/services/index.html services: : mysql:8.0 // This folder is cached between builds // http://docs.gitlab.com/ee/ci/yaml/README.html#cache cache: paths: : ~/.cache/pip/ before_script: : apt -y update : apt -y install apt-utils : apt -y install net-tools python3.8 python3-pip mysql-client libmysqlclient-dev : apt -y upgrade : pip3 install -r requirements.txt migrations: stage: build script: : python3 manage.py makemigrations : python3 manage.py migrate : python3 managepy check django-tests: stage: test script: // The MYSQL user only gets permissions for MYSQL_DB, so Django can't create a test database. : echo "GRANT ALL on *.* to '${MYSQL_USER}';"| mysql -u root --password="${MYSQL_ROOT_PASSWORD}" -h mysql // use python3 explicitly. see https://wiki.ubuntu.com/Python/3 : python3 manage.py test deploy: stage: deploy script: echo "Define your deployment script!" environment: production
A possible script for visual novel engines like Ren'Py, showing OIML's command language heritage.
character: sylvie name: Sylvie color: #c8ffc8 image: assets/sylvie_normal.png character: me name: Me color: #c8c8ff # start scene: bg meadow sylvie: Hi there! How was class? me: Good... : I can't bring myself to admit that it all went in one ear and out the other. me: Are you going home now? Wanna walk back with me? sylvie: Sure! scene bg: assets/meadow.png : After a short while, we reach the meadows just outside the neighborhood where we both live. : It's a scenic view I've grown used to. Autumn is especially beautiful here. : When we were children, we played in these meadows a lot, so they're full of memories. me: Hey... Um... sylvie green smile : She turns to me and smiles. She looks so welcoming that I feel my nervousness melt away. : I'll ask her! me: : Umm... Will you... : Will you be my artist for a visual novel? sylvie green surprised : Silence. # leaving sylvie: I'll get right on it! hide sylvie : ... me: That wasn't what I meant!