Reframed incorrect section and fixed some formatting

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
This commit is contained in:
Whit Waldo 2025-08-21 08:51:23 -05:00
parent 11b03c5504
commit 19bcac058f
1 changed files with 5 additions and 12 deletions

View File

@ -85,17 +85,8 @@ Content-Length: 12
{{< /tabpane >}} {{< /tabpane >}}
In this example, `My Message` is saved. It is not quoted because Dapr's API internally parse the JSON request In this example, `My Message` is saved. It is not quoted because Dapr's API internally serializes the string before
object before saving it. serving it.
```JSON
[
{
"key": "MyKey",
"value": "My Message"
}
]
```
## PubSub ## PubSub
@ -109,7 +100,9 @@ object before saving it.
await client.PublishEventAsync("MyPubSubName", "TopicName", "My Message"); await client.PublishEventAsync("MyPubSubName", "TopicName", "My Message");
``` ```
The event is published and the content is serialized to `byte[]` and sent to Dapr sidecar. The subscriber receives it as a [CloudEvent](https://github.com/cloudevents/spec). Cloud event defines `data` as String. The Dapr SDK also provides a built-in deserializer for `CloudEvent` object. The event is published and the content is serialized to `byte[]` and sent to Dapr sidecar. The subscriber receives it
as a [CloudEvent](https://github.com/cloudevents/spec). Cloud event defines `data` as string. The Dapr SDK also provides a built-in deserializer
for the `CloudEvent` object.
```csharp ```csharp
public async Task<IActionResult> HandleMessage(string message) public async Task<IActionResult> HandleMessage(string message)