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

# Converting To/From Other Formats

Internet Object interoperates with common data formats. This page summarizes how data maps in each direction. For the JSON specifics, see [JSON Compatibility](/interoperability/json-compatibility.md).

## JSON

* **JSON → IO** — direct: a JSON object/array is valid Internet Object data. Optionally lift repeated keys into a schema to shrink collections.
* **IO → JSON** — direct for the common types; lossy for `decimal`, `bigint`, `datetime`, `binary`, and `NaN`/`Inf` (see [JSON Compatibility](/interoperability/json-compatibility.md)).

## CSV

* **CSV → IO** — a header row maps to a schema; each data row becomes a collection record:

  ```ruby
  # CSV:  name,age,active
  #       John,30,true
  name: string, age: int, active: bool
  ---
  ~ John, 30, true
  ```
* **IO → CSV** — flat collections export cleanly; nested objects/arrays must be flattened or encoded, since CSV has no nesting.

## YAML

YAML and Internet Object both support nesting and comments. Conversion is straightforward for scalars, maps, and sequences; Internet Object adds schema and validation that YAML lacks, and its richer scalar types (`decimal`, `bigint`, `datetime`, `binary`) map to YAML scalars.

## General guidance

* Converting **into** Internet Object is a good time to add a schema and tighten types.
* Converting **out** may be lossy for the precise types above — keep the canonical copy in Internet Object when exactness matters.

## See Also

* [JSON Compatibility](/interoperability/json-compatibility.md) · [Why Internet Object?](/internet-object/why-internet-object.md)


---

# 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/interoperability/conversions.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.
