Skip to main content

RtSystemTextJsonSerializer

Namespace: Meshmakers.Octo.Runtime.Contracts.Serialization

System.Text.Json counterpart of RtNewtonsoftSerializer — the canonical STJ options for the Rt model. Lives next to its Newtonsoft twin and aggregates the same converter family (the CK/Rt id converters plus RtAttributesConverter).

public static class RtSystemTextJsonSerializer

Inheritance ObjectRtSystemTextJsonSerializer

Remarks:

Like RtNewtonsoftSerializer (which uses DefaultValueHandling.Ignore), this default drops null properties on write (). It does not drop default value-types (0/false) — the STJ migration deliberately stopped doing that.

The ETL pipeline needs the opposite null policy (preserve explicit nulls so it can distinguish DataKind.Null from DataKind.Undefined); it overrides at the SDK level — see SystemTextJsonOptions in Sdk.Common.

Fields

Default

Shared default options instance. Drops null properties, matching RtNewtonsoftSerializer.

public static JsonSerializerOptions Default;

Methods

CreateDefault()

Creates a fresh with the Rt-model converter family applied. Callers that need a different null policy (e.g. the pipeline's null preservation) start from this and override .

public static JsonSerializerOptions CreateDefault()

Returns

JsonSerializerOptions