> For the complete documentation index, see [llms.txt](https://docs.internetobject.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.internetobject.org/structure-and-syntax/structural-elements/structural-characters-n-keywords.md).

# Structural Characters & Separators

Structural characters define the syntax and organization of data within an Internet Object document. They form the foundation of the format's grammar and control how data is parsed and interpreted.

## Character set

| Symbol | Name                 | Unicode  | Function            | Context                                         |
| ------ | -------------------- | -------- | ------------------- | ----------------------------------------------- |
| `,`    | Comma                | `U+002C` | Value separator     | Separates items in arrays and objects           |
| `~`    | Tilde                | `U+007E` | Record delimiter    | Marks the start of a new record in a collection |
| `:`    | Colon                | `U+003A` | Key-value separator | Separates a key from its value                  |
| `[`    | Open square bracket  | `U+005B` | Array start         | Begins an array                                 |
| `]`    | Close square bracket | `U+005D` | Array end           | Ends an array                                   |
| `{`    | Open curly bracket   | `U+007B` | Object start        | Begins an object                                |
| `}`    | Close curly bracket  | `U+007D` | Object end          | Ends an object                                  |
| `---`  | Triple hyphen        | `U+002D` | Section separator   | Separates the header and data sections          |
| `#`    | Hash                 | `U+0023` | Comment delimiter   | Starts a single-line comment                    |
| `"`    | Double quote         | `U+0022` | String delimiter    | Encloses a string value                         |
| `'`    | Single quote         | `U+0027` | String delimiter    | Alternative string delimiter                    |

## Usage examples

### Basic structure

```ruby
# Surrounding braces define the object,
# and key-value pairs are separated by colons and commas
~ { name: "John Doe", age: 30, active: true }

# An array encloses its values in square brackets
~ [ "item1", "item2", "item3" ]
```

### Collections and records

```ruby
# Schema definition
~ $person: {name: string, age: number}
# Triple hyphens separate the header from the data
---
# A tilde marks each new record in the collection
~ "Alice", 25
~ "Bob", 30
~ "Charlie", 35
```

### String delimiters

```ruby
{
    message1: "Hello World",      # Double-quoted string
    message2: 'Hello World',      # Single-quoted (equivalent)
    quote: "She said \"hi\""      # Escape an inner quote with a backslash
}
```

For values that contain many backslashes — such as Windows paths or regular expressions — use a [raw string](/structure-and-syntax/values/string/raw-strings.md) (`r"C:\Temp\new"`), where backslashes are literal.

## Structural rules

* **Balanced delimiters** — every opening bracket or brace must have a matching closing one.
* **Proper nesting** — structures may nest but must preserve a well-formed hierarchy.
* **Separator consistency** — commas separate elements at the same structural level.
* **Section division** — triple hyphens (`---`) separate the header and data sections.
* **Comment scope** — a hash (`#`) comment extends to the end of the line only.
* **String equivalence** — single and double quotes are functionally equivalent.

## See Also

* [Other Special Characters](/structure-and-syntax/structural-elements/other-special-characters.md) — variable, schema, and sign modifiers
* [Literals](/structure-and-syntax/structural-elements/literals.md) — predefined constant values
* [Comments](/structure-and-syntax/comments.md) — comment syntax and usage
* [The Structure](/collections/collection.md) — collection structure and records


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.internetobject.org/structure-and-syntax/structural-elements/structural-characters-n-keywords.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
