Use when System.Text.Json work is not a plain POCO round-trip — inspecting/mutating JSON without a model (including answering a few questions about an unknown payload), editing JSON whose shape is not controlled by the app, reading or writing at high…
Use when targeting recent .NET runtimes (8/9/10+) and you need the newer, stricter System.Text.Json behavior or APIs a model trained on older docs may not know — the JsonSerializerOptions.Strict preset, AllowDuplicateProperties, RespectNullableAnnotations /…
Use when migrating serialization code from Newtonsoft.Json (Json.NET) to System.Text.Json — replacing JsonConvert / JsonSerializerSettings / [JsonProperty] and reconciling the behavioral differences that compile clean but silently change output…
Use when System.Text.Json runs under Native AOT or trimming (PublishAot / PublishTrimmed), or when you want the faster, reflection-free serialization path — i.e. a JsonSerializerContext with [JsonSerializable]. Reflection-based JsonSerializer compiles but…
Use when the action itself is the hard part — especially a dedicated synchronous/asynchronous action class, Command.Action assignment, shared action bases, dependency-carrying actions, cancellation, Task<int>, exit codes, or splitting Parse(args) from…
Use when declaring or configuring System.CommandLine inputs — Option<T> and Argument<T>: names vs aliases, Description, HelpName, completion, Required, DefaultValueFactory, Arity, stable-2.x case-insensitive known values, collection parsing, existing…
Use when building or modifying a .NET command-line app with System.CommandLine (RootCommand, Command, Option<T>, Argument<T>) on the current GA / 2.x–3.x API. This library had a large breaking redesign at 2.0 GA, so training data and web snippets are FULL of…
Use when building or modifying a .NET command-line app with System.CommandLine (RootCommand, Command, Option<T>, Argument<T>) on the current GA / 2.x–3.x API. This library had a large breaking redesign at 2.0 GA, so training data and web snippets are FULL of…