> For the complete documentation index, see [llms.txt](https://daseldocs.tomwright.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daseldocs.tomwright.me/input-output/read-writer-flags.md).

# Read/Writer flags

Some parsers accept options that aren't available in others, for this we use read/writer flags.

## Format

```
--read-flag foo=bar
--write-flag foo=bar
```

## Flags by parser

### CSV

| Read/Write | Name          | Values                                                    | Description                                                |
| ---------- | ------------- | --------------------------------------------------------- | ---------------------------------------------------------- |
| read/write | csv-delimiter | Any single character to use as a delimiter. E.g. `,`, `;` | Changes the delimiter used when reading/writing CSV files. |

### XML

| Read/Write | Name     | Values     | Description                                                      |
| ---------- | -------- | ---------- | ---------------------------------------------------------------- |
| read       | xml-mode | structured | Changes the internal structure that XML documents are read into. |

### HCL

| Read/Write | Name             | Values | Description                                                                                                                                                                                                     |
| ---------- | ---------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| read       | hcl-block-format | array  | HCL block contents usually expand to an array when duplicate labels are defined on another block. Setting this to `array` will force blocks to always be an array of values, even when there are no duplicates. |

### KDL

| Read/Write | Name        | Values | Description                                                                                                                            |
| ---------- | ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| write      | kdl-version | 1, 2   | Controls the output KDL version. Version `2` (default) uses `#true`, `#false`, `#null`. Version `1` uses bare `true`, `false`, `null`. |


---

# 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://daseldocs.tomwright.me/input-output/read-writer-flags.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.
