Overview

IAA Config is a lightweight sequential configuration language designed for deterministic parsing, runtime variable management, nested objects, object arrays, and format conversion.

Core Behavior

  • Files are parsed top to bottom.
  • Values become available immediately after parsing.
  • Dynamic variables may be updated and written back to disk.
  • Nested paths create structured objects.
  • Repeated object definitions automatically create arrays.
  • Arrays may contain nested objects.

Basic Structure


{Production Configuration}

application_name:
 Inventory Service

port:
 8080

Object Array Example


players:
 name:
  Steve

 age:
  20

 name:
  Alice

 age:
  25

Syntax

IAA uses indentation-based structures with predictable parser behavior.

Title Blocks


{My Configuration}

Variables


service_name:
 Inventory API

Dynamic Variables


dynamic version:
 1.0

Comments


# Comment text

Examples

Examples showing normal variables, nested objects, dynamic variables, and object arrays.

Complete Example


{Game Configuration}

dynamic version:
 1.2

application_name:
 Example Game

settings.debug:
 True

Loading IAA


from iaacompiler import IAAModule

cfg = IAAModule()

cfg.parse_iaa(
 "config.iaa"
)

print(cfg.application_name)

Object Array Example


players:

 name:
  Steve

 level:
  20


 name:
  Alice

 level:
  25

The parser converts this into:


{
 "players": [
  {
   "name": "Steve",
   "level": 20
  },
  {
   "name": "Alice",
   "level": 25
  }
 ]
}

Accessing Arrays


cfg.players[0]["name"]

# Steve


cfg.players[1]["level"]

# 25

Rules

The parser follows strict sequential rules to keep configuration loading predictable.

Parser Rules

  • Files are read from top to bottom.
  • Values become available after they are parsed.
  • Nested paths automatically create objects.
  • Repeated object blocks create arrays.
  • Array entries preserve grouped fields.
  • Array indexes begin at zero.
  • Unlimited nesting depth is supported.

Repeated Objects

IAA does not overwrite duplicate object blocks. Instead, it creates an array.


items:

 name:
  Sword


 name:
  Shield

Becomes:


{
 "items":[
  {
   "name":"Sword"
  },
  {
   "name":"Shield"
  }
 ]
}

Value Types

IAA supports primitive values and structured objects.

Type Description
Integer Whole numbers.
Float Decimal numbers.
String Text values.
Boolean True or False values.
Object Nested key/value structures.
Array Collections of repeated objects.

number:
 42


decimal:
 1.5


enabled:
 True

Dynamic Variables

Dynamic variables are runtime values that can be changed and saved back into an IAA file.

Declaration


dynamic build:
 100

Python Modification


cfg.modify_dynamic(
 "build",
 101,
 "config.iaa"
)

Only the changed value is updated while keeping the original structure.

Nested Variables

Nested variables create structured objects using dot notation.

Example


server.host:
 localhost


server.port:
 8080


server.settings.debug:
 True

Output


{
 "server":{
  "host":"localhost",
  "port":8080,
  "settings":{
   "debug":true
  }
 }
}

Combining Nesting and Arrays


game.players:

 name:
  Steve

 inventory:
  sword


 name:
  Alex

 inventory:
  bow

Nested paths and arrays can be combined to create complex configuration structures.

Arrays

IAA automatically creates arrays when repeated object structures appear under the same parent.

Creating Arrays


players:

 name:
  Steve

 age:
  20


 name:
  Alice

 age:
  25

Result


{
 "players":[
  {
   "name":"Steve",
   "age":20
  },
  {
   "name":"Alice",
   "age":25
  }
 ]
}

Access Syntax

Python


cfg.players[0]["name"]

cfg.players[1]["age"]

IAA Path


players.0.name

players.1.age

Array Rules

  • Duplicate objects become list entries.
  • Fields remain grouped together.
  • Arrays support nested objects.
  • Arrays can be accessed by index.

API

The IAA API converts IAA configuration files into JSON, YAML, and TOML formats. Structured objects and arrays are preserved during conversion.

Base URL
https://iaa.iaa-api.workers.dev/

Request Format


{
 "format":"json",
 "data":
 "players:\n name:\n  Steve"
}

Nested Object Conversion


server.host:
 localhost


server.settings.debug:
 True

Creates:


{
 "server":{
  "host":"localhost",
  "settings":{
   "debug":true
  }
 }
}

Array Conversion

Repeated object definitions are converted into arrays instead of duplicate keys.


players:

 name:
  Steve


 name:
  Alice

JSON output:


{
 "players":[
  {
   "name":"Steve"
  },
  {
   "name":"Alice"
  }
 ]
}

Supported Conversions

Source Target
IAA JSON, YAML, TOML
JSON IAA