文档

Cloud Code

Open Unity Dashboard

Cloud Code

自定义序列化

Customize serialization and deserialization with Newtonsoft.Json attributes.
阅读时间1 分钟最后更新于 12 天前

Cloud Code 模块使用 Newtonsoft.Json 库对数据进行序列化和反序列化。您可以使用
Newtonsoft.Json
属性自定义数据的序列化和反序列化。
例如,可以使用
JsonProperty
属性更改数据的 JSON 表示形式中的属性名称:
using Newtonsoft.Json;public class MyData{ [JsonProperty("myProperty")] public string MyProperty { get; set; }}
如需了解更多信息,请参阅 Newtonsoft.Json 文档。