Port closed private JSON response serializers
ProprietaryOpt-in default-encoder/declaration-order port of a private instance JavaScriptSerializer field initialized by its default constructor, whose only bound reads are supported flat anonymous response calls on this instance. Accept string values and fixed Boolean/integer literal siblings. Replace the serializer with a private object lifetime marker at the same field position; typed helpers capture the marker and values in order and retain the null-receiver check before encoding. Require all field uses to qualify; leave configuration, aliases, escapes, unsupported calls/contexts, partial/generic/proxy/serializable owners and snapshots unchanged. Preserve default encoding/length/error policy from the flat-string port; custom encoders/localization, private-field reflection/serialization contracts and allocation identity are not emulated. Separate from version upgrades; Core 3.0 or later.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseHttpUtilityForClosedResponseSerializerFieldsmod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseHttpUtilityForClosedResponseSerializerFieldsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.