Custom serialization
Customize serialization and deserialization with Newtonsoft.Json attributes.
Read time 1 minuteLast updated 8 months ago
Cloud Code modules use the Newtonsoft.Json library to serialize and deserialize data. You can use the attributes to customize the serialization and deserialization of your data.
Newtonsoft.JsonFor example, you can use the attribute to change the name of a property in the JSON representation of your data:
JsonPropertyusing Newtonsoft.Json;public class MyData{ [JsonProperty("myProperty")] public string MyProperty { get; set; }}
For more information, refer to the Newtonsoft.Json documentation.