> For the complete documentation index, see [llms.txt](https://docs.arcware.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arcware.cloud/unreal-engine-setup/using-the-arcware-pixel-streaming-template-project/getting-started/arcware-blueprints/arcware-player-controller/sending-and-receiving-json-messages.md).

# Sending and Receiving Json messages

In the BP\_Arcware\_Player\_Controller blueprint you will see pre-existing blueprint nodes for handling the receiving/sending of Json messages. \
\
The content/wording of the Json messages should be agreed upon between the web frontend developer and Unreal Engine developer, as both sides need to be aware of the possible Json messages it's receiving before anything can be triggered. \
\
A typically workflow example of a Json message being sent to Unreal Engine would be...\
\
1\) User clicks button in frontend\
\
2\) Frontend sends Json message to Unreal Engine application i.e...

```
emitUIInteraction({ Console: r.setres 1000x2000w })
```

3\) Unreal Engine receives this Json message in the Player Controller via the '**Pixel Streaming Input**' component

<figure><img src="/files/loYRhL8W4RWxUwoNdkFo" alt=""><figcaption></figcaption></figure>

4\)  Json message is received and the **Get Json String Value** node searches the message for the pre-determined **Field Name**... **'Console'**. If this **Field name** is present in the Json message, then the **String Value** will be used to trigger a Console Command. In this example the **String Value** would be **'r.setres 1000x2000w'**

<figure><img src="/files/sisJ56EpgoyNHOWCoR0P" alt=""><figcaption></figcaption></figure>

5\) (This step is Optional). After the desired event is triggered, we send a Json message response back to frontend via the **Send Pixel Streaming Response** node. The content of the message response should be discussed with the frontend developer so they know what to intercept, in this example we just send back the same message as received i.e...

```
{ "Console": "r.setres 1000x2000w" }
```

<figure><img src="/files/l6kRTiRKZR57ECsj5f0d" alt=""><figcaption></figcaption></figure>


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.arcware.cloud/unreal-engine-setup/using-the-arcware-pixel-streaming-template-project/getting-started/arcware-blueprints/arcware-player-controller/sending-and-receiving-json-messages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
