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

Fix to patching decimals in JsonMergePatch.SystemText #41

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

mosteadman
Copy link
Contributor

These are changes specific to the SystemText.JSON implementation of this framework

Developed to fix issue #38

I have added a JSONElement extension GetGenericNumber to the SystemText Patch Builder

Previously it would cast all JSON numbers to an Int64 (even if they were decimal)

Now, it will attempt to cast to an Int64 and failing that, will cast to a decimal instead

This should allow for patching of both integer and floating point numbers

I have also added a new test to demonstrate this working for both scenarios

@Morcatko - could you run your eyes over this and make sure I've not missed anything obvious ? Cheers

Copy link
Owner

@Morcatko Morcatko left a comment

Choose a reason for hiding this comment

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

Very nice

@Morcatko Morcatko merged commit c1b2549 into Morcatko:master Nov 11, 2020
@Morcatko
Copy link
Owner

Morcatko commented Nov 11, 2020

I am quite busy these days, but expect a new nuget no later than this week

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