Documentation

​
​

Development

User Acquisition

Monetization

Industry

Cloud Code

Scripting API

Services C# SDKs

Services JavaScript SDKs

Admin REST API

Client REST API

Scheduler Admin REST API

Observability REST API

Open Unity Dashboard

Cloud Code

LiveOps
​
​
Cloud Code
  • Overview
  • Get started
  • Server authority
  • Cloud Code C# modules
    • Overview
    • Get started
    • Concepts
    • Tutorials
      • Run modules
      • Write modules
      • Development essentials
        • Write unit tests
        • Dependency injection
        • Custom serialization
        • Batch requests
        • In-memory cache
      • Automate deployment
      • Integrate services
      • Advanced configuration
      • Use Cases
    • Reference
  • Cloud Code JavaScript scripts
  • Logging
  • Use-case samples
  • Privacy and consent
  1. Cloud Code

Custom serialization

Customize serialization and deserialization with Newtonsoft.Json attributes.
Read time 1 minute
Last updated 9 months ago

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

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.


    Report a problem with this page