# Open Strings

An **Open String** in Internet Object is the simplest string format. It is a sequence of Unicode codepoints not enclosed in any quotes. Open strings are ideal for simple, unstructured text that does not begin or end with whitespace and does not require escaping of special or structural characters.

Open strings are scalar values. They preserve all internal whitespace and Unicode content, but cannot start or end with whitespace.

## Syntax

Open strings begin with any non-whitespace codepoint and end at the first whitespace or structural character, or at the end of the document.

```ebnf
openString    = nonWhitespace (codepoint)*
nonWhitespace = any Unicode codepoint except whitespace
codepoint     = any Unicode codepoint except structural characters or document end
```

## Structural Characters

| Symbol             | Name                 | Unicode  | Description                                     |
| ------------------ | -------------------- | -------- | ----------------------------------------------- |
| (space, tab, etc.) | Whitespace           | Multiple | Terminates or invalidates open string start/end |
| `:`                | Colon                | U+003A   | Structural character (terminates string)        |
| `,`                | Comma                | U+002C   | Structural character (terminates string)        |
| `{`                | Open Curly Brace     | U+007B   | Structural character (terminates string)        |
| `}`                | Close Curly Brace    | U+007D   | Structural character (terminates string)        |
| `[`                | Open Square Bracket  | U+005B   | Structural character (terminates string)        |
| `]`                | Close Square Bracket | U+005D   | Structural character (terminates string)        |
| `"`                | Double Quote         | U+0022   | Allowed, does not terminate or need escape      |
| `'`                | Single Quote         | U+0027   | Allowed, does not terminate or need escape      |

## Valid Forms

Examples of valid open strings:

```
John Doe
Peter D'mello
जॉन डो
Wow Great
😃
```

Multiple open strings in an object:

```
जॉन डो, Wow Great, 😃
```

Multiline open string (no escaping required):

```
Lorem ipsum dolor sit amet consetetur sadipscing elitr sed
diam nonumy eirmod.

Tempor invidunt ut labore et dolore magna aliquyam erat
sed diam voluptua
```

## Optional Behaviors

* **Whitespace**: Open strings cannot start or end with whitespace, but preserve all internal whitespace.
* **No Escaping**: No character escaping is supported. Quotes and other characters are allowed as-is.
* **Multiline**: Open strings can span multiple lines if not interrupted by structural characters.

## Comments

Comments are not allowed within open strings, but may appear outside or between values as per Internet Object comment rules.

## Invalid Forms

Examples of invalid open strings:

```yaml
 John Doe      # ✗ Starts with whitespace (should be 'John Doe')
John Doe       # ✗ Ends with whitespace (should be 'John Doe')
"John Doe"     # ✗ Quoted (should be unquoted for open string)
.John          # ✗ Starts with a dot (if dot is structural in context)
```

## Preservation of Structure

Internet Object preserves:

* All Unicode codepoints and internal whitespace as written
* The unquoted, open form of the string

It does **not** interpret or enforce:

* Escaping or encoding
* Leading/trailing whitespace (disallowed)
* Application-specific constraints

## See Also

* [String Values Overview](/the-structure/values/string.md)
* [Regular String](/the-structure/values/string/regular-strings.md)
* [Raw String](/the-structure/values/string/raw-strings.md)


---

# Agent Instructions: 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/the-structure/values/string/open-strings.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.
