Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Add new option for specifying .NET type to express Json numbers: --generate-json-number-as = double | float | decimal with a default of double. #166

Merged
merged 2 commits into from
Oct 25, 2022

Conversation

shaopeng-gh
Copy link
Collaborator

@shaopeng-gh shaopeng-gh commented Oct 18, 2022

FEATURE: Add new option for specifying .NET type to express Json numbers: --generate-json-number-as = double | float | decimal with a default of double. (before change it was fixed as double.)

Background: The difference can be seem here
integer
number

This change added the option for user to generate the C# class double | float | decimal as suitable, for Json number.
Before this change, there is no option and only produce C# class double for Json number.
(Whether the class of the choice is suitable or not, is outside of the scope of this code generation tool,
and is decided by the user of the tool,
according to the target project to put the generated code in.
e.g. the target project use decimals, if our tool only support double, they will need to do the cast back and forth.)

Copy link
Member

@michaelcfanning michaelcfanning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@michaelcfanning michaelcfanning merged commit 438960b into main Oct 25, 2022
@shaopeng-gh shaopeng-gh deleted the users/shaopeng-gh/jsonnumberpr branch October 27, 2022 02:10
@shaopeng-gh shaopeng-gh mentioned this pull request Nov 7, 2022
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