> 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/comments.md).

# Comments

Internet Object supports **single-line comments** for documenting and annotating data. A comment starts with a hash sign (`#`) and runs to the end of the line.

## Syntax

* **Start character** — the hash sign (`#`, `U+0023`).
* **Scope** — a single line only.
* **Placement** — anywhere in the document.
* **Content** — everything after `#` on the same line is ignored by the parser.

## Examples

```ruby
# Internet Object document: personnel records

# Address schema definition
~ $address: {street:string, zip:{string, maxLen:5}, city:string}

# Person schema definition
~ $schema: {
    name:string,               # individual's full name
    age:int,                   # age in years
    homeAddress?: $address,    # optional home address
    officeAddress?: $address   # optional office address
}
---
# Personnel records
~ John Doe, 25, {Queens, "50010", NewYork}, {Bond Street, "50001", NewYork}
~ Jane Doe, 20, {Queens, "50010", NewYork}, {Bond Street, "50001", NewYork}
```

### Comment placement

A comment can stand on its own line or trail a value:

```ruby
{
    # person details
    name: John Doe, # inline comment
    age: 30,        # another inline comment

    # contact information
    contact: {
        email: 'john@example.com',
        phone: '+1-555-0123'
    }
}
```

## Rules

* A comment can appear on any line, standalone or trailing a value.
* A comment supports full Unicode text.
* A comment cannot span multiple lines.
* No escaping is needed inside a comment.
* A `#` inside a quoted string is literal text, not a comment.

## Best practices

* **Be clear and concise** — use direct language.
* **Explain why, not what** — focus on reasoning, not the obvious.
* **Keep comments current** — update them when the data or schema changes.
* **Stay consistent** — keep a uniform commenting style across documents.

## See Also

* [Internet Object Document](/structure-and-syntax/introduction.md) — overall document structure
* [Encoding](/structure-and-syntax/encoding.md) — Unicode support in text content


---

# 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:

```
GET https://docs.internetobject.org/structure-and-syntax/comments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
