Click or drag to resize

Data serialization

The Cadence service internally treats workflow and activity arguments and results as simple byte arrays. The Cadence clients are responsible for serializing and deserializing the application level arguments and results to the binary data actually managed by Cadence.

By default the .NET, Java, and Go Cadence clients serialize this data as JSON. The .NET client uses the popular Newtonsoft.Json nuget package to accomplish this, with the addition of a bit of code to support Neon.ModelGen generated IRoundtripData classes. This is handled by JsonDataConverter.

Note Note

The default .NET client JSON data serializer is based on the very popular Newtonsoft JSON.NET package. You can use attributes like [JsonProperty], JsonIgnore, and [JsonConverter] for fine control over this. Here's a link to more information: JSON.NET Attributes

You can write a custom converter to support XML, protobuf, or whatever. This may be necessary if you need to interoperate with workflows or activities written for another client. Your new converter will need to implement IDataConverter and then assign an instance of your converter to DataConverter just after connecting a client to Cadence.

See Also

Reference