Created
March 8, 2022 18:08
-
-
Save awswithdotnet/b381177100a084ec7dfc78e67e7cf72a to your computer and use it in GitHub Desktop.
sns CloudEventsMessageFormatting CloudEventsMessageFormatter Partial 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jsonFormatter = new JsonEventFormatter(); | |
var eventMessage = jsonFormatter.EncodeStructuredModeMessage(cloudEvent, out var contentType); | |
string encodedMessage = System.Text.Encoding.UTF8.GetString(eventMessage.ToArray(), 0, eventMessage.Length); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment