> 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

Converting Internet Object to and from JSON and 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.internetobject.org/interoperability/conversions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
