How do I disable double encoding when sending a JSON String literal in C#?

To send a JSON string literal in C# and avoid double-encoding issues, toggle the attribute:

pubnub.EnableJsonEncodingForPublish = false;

For example, if you're using Xamarin (C#-based cross-platform mobile app framework) and send the following message payload to be delivered as an APNS (Apple Push Notification Service) via PubNub:

"{\"aps\":{\"alert\":\"blah\",\"sound\":\"ping.aiff\"}}"

The notification will be delivered verbatim as an encoded JSON string literal when _enableJsonEncodingForPublish is set to true. To deliver the alert field contents within the JSON message as the notification, set the attribute to false.