VTS-Sharp icon indicating copy to clipboard operation
VTS-Sharp copied to clipboard

BUG: Newtonsoft Serializer sending optional values

Open FomTarro opened this issue 1 year ago • 0 comments

The old Unity serializer had special logic to prevent it from sending certain optional values. For example, in VTSParameterInjectionValue, the weight field is optional. In the data model, we initialize it as NaN. This stopped it from being included on the serialized model at all in the old way. It seems the new serializer is being overzealous.

Go through the model files and find the various sentinel values we use to try to exclude values from the payload, then update the Newtonsoft serializer to accommodate.

FomTarro avatar Dec 03 '23 14:12 FomTarro