quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

fix(C#): Enhance number handling in SystemTextJsonCSharpRenderer

Open mikecrowe-otp opened this issue 7 months ago • 0 comments

Description

  • Added support for handling both integer and double types in a union case.
  • Introduced a variable generator to manage variable naming dynamically.
  • Updated decoder transformer cases to accommodate the new logic for number types.
  • Ensured backward compatibility for existing single type handling.

Related Issue

Fixes #2804

Motivation and Context

C# code would not compile

Previous Behaviour / Output

error CS0152: The switch statement contains multiple cases with the label value '8'

New Behaviour / Output

Code compiles

How Has This Been Tested?

In our production code

Screenshots (if appropriate):

mikecrowe-otp avatar Jul 11 '25 14:07 mikecrowe-otp