# 自定义序列化

> Customize serialization and deserialization with Newtonsoft.Json attributes.

Cloud Code 模块使用 [Newtonsoft.Json](https://www.newtonsoft.com/json) 库对数据进行序列化和反序列化。您可以使用 `Newtonsoft.Json` 属性自定义数据的序列化和反序列化。

例如，可以使用 `JsonProperty` 属性更改数据的 JSON 表示形式中的属性名称：

```csharp
using Newtonsoft.Json;

public class MyData
{
    [JsonProperty("myProperty")]
    public string MyProperty { get; set; }
}
```

如需了解更多信息，请参阅 [Newtonsoft.Json 文档](https://www.newtonsoft.com/json/help/html/SerializationAttributes.htm)。
