Skip to content

Reuse StringFrom for modelType extraction in C# - #684

Merged
mristin merged 1 commit into
mainfrom
simplify-csharp-jsonization-modeltype
Sep 10, 2026
Merged

mristin merged 1 commit into
mainfrom
simplify-csharp-jsonization-modeltype

Conversation

@mristin

@mristin mristin commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

The interface and named-union deserialization methods duplicated the JsonValue-cast-and-TryGetValue logic for extracting the modelType string inline, instead of reusing the existing
DeserializeImplementation.StringFrom already used for this exact purpose elsewhere. This reduces the generated code size at every interface and named-union *From method.

The interface and named-union deserialization methods duplicated the
JsonValue-cast-and-TryGetValue logic for extracting the modelType
string inline, instead of reusing the existing
``DeserializeImplementation.StringFrom`` already used for this
exact purpose elsewhere. This reduces the generated
code size at every interface and named-union ``*From`` method.
@mristin
mristin merged commit 3eb2900 into main Sep 10, 2026
4 checks passed
@mristin
mristin deleted the simplify-csharp-jsonization-modeltype branch September 10, 2026 13:59
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 34485469675

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage remained the same at 85.242%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 39816
Covered Lines: 33940
Line Coverage: 85.24%
Coverage Strength: 2.56 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants