> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://documentation.celestory.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 🟪 Object to JSON

# 🟪 Object to JSON

${frame}[Video: anatomy of the Object to JSON block](https://celestory-docs-videos.netlify.app/en/anatomie-bloc/objecttojson.html)

![Object to JSON](https://celestory-docs-illustrations.netlify.app/en/ObjecttoJSON_EN.svg)

The Object to JSON block converts an Object variable (a "record" holding several pieces of information) into JSON-formatted text — a format most websites and online services can read. This text is then ready to be sent in an HTTP request, a Webhook, or saved.

This is the reverse operation of the "JSON to Object" block.

## 📥 Inputs

-   object (Object): The Object variable to convert.

## 📤 Outputs

-   json (Text): The resulting JSON string, valid and ready to be transmitted.

## 💡 Example

**Scenario: Sending a player record built in the graph to an API**

1. A `player` object has been progressively filled in using Set in Object blocks.
2. An Object to JSON block converts this object into a JSON string.
3. The `json` output is wired to the body input of an HTTP Request block to send it to an external server.

## ⚙️ Technical Details

-   **Internal ID**: `objectToJson`
-   **No stream points**: This block has no `in`/`out` Stream connectors — it doesn't need to be "wired" into the action sequence. It's calculated automatically whenever its `json` output is used elsewhere, like a formula.
-   **Nested objects**: Nested objects and lists in the source variable are recursively serialized into valid JSON.

---

*Documented version: v1*