Skip to content

Refactor parseMapToStruct(), getDecodingStructType(), getEncodingStructType(), and field struct#754

Merged
fxamacker merged 3 commits intomasterfrom
fxamacker/refactor-parseMapToStruct-etc
Mar 29, 2026
Merged

Refactor parseMapToStruct(), getDecodingStructType(), getEncodingStructType(), and field struct#754
fxamacker merged 3 commits intomasterfrom
fxamacker/refactor-parseMapToStruct-etc

Conversation

@fxamacker
Copy link
Copy Markdown
Owner

This PR refactors parseMapToStruct() (was 275 lines) by:

  • extracting helper functions that can be inlined
  • refactoring and simplifying control flow

Also, this PR refactors getDecodingStructType() and getEncodingStructType() for readability.

field struct is also refactored into encodingField and decodingField, so that encodingField doesn't contain any data needed only for decoding, vice versa.

This PR does not change encoding or decoding behavior.

This commit refactors parseMapToStruct by:
- extracting helper functions that can be inlined
- refactoring and simplifying control flow

This refactor does not change encoding or decoding behavior.
@fxamacker fxamacker self-assigned this Mar 28, 2026
@fxamacker fxamacker added the improvement improvement that does not add new feature label Mar 28, 2026
@fxamacker fxamacker changed the base branch from fxamacker/small-bugfixes to master March 28, 2026 23:55
@fxamacker fxamacker force-pushed the fxamacker/refactor-parseMapToStruct-etc branch from 6f5ad66 to 145a220 Compare March 29, 2026 00:02
@fxamacker fxamacker force-pushed the fxamacker/refactor-parseMapToStruct-etc branch from 145a220 to 48a18bf Compare March 29, 2026 00:05
@fxamacker fxamacker merged commit 3851e1b into master Mar 29, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement improvement that does not add new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants