Fix JSON serialization of quantities with decimal values - #868
Conversation
Codecov Report
@@ Coverage Diff @@## master #868 +/- ##
==========================================
- Coverage 83.09% 82.74% -0.36%
==========================================
Files 287 287 Lines 42987 43332 +345 ==========================================
+ Hits 35720 35853 +133 - Misses 7267 7479 +212
Continue to review full report at Codecov.
|
angularsen
commented
Dec 16, 2020
Solid work on this 👏 Love the tests! I think it is clever to use string to support How about this:
This makes the schema more extensible to other types of numbers with generics, as have been discussed a number of times: |
75665e8 to
c5af7a1Comparerohahn
commented
Dec 17, 2020
I implemented your proposal. |
Add IDecimalQuantity interface to expose the decimal value Serialize decimal values as string to keep number of decimal places
c5af7a1 to
e9a8161Compare
angularsen
left a comment
There was a problem hiding this comment.
Looks perfect to me, great work on this!
Uh oh!
There was an error while loading. Please reload this page.
angularsen
commented
Dec 17, 2020
Nuget is on the way out, I'd appreciate it if you gave it a spin to ensure it works as expected and comment back here! 🙇 |
rohahn
commented
Dec 18, 2020
Why is the version number 4.3.0? |
angularsen
commented
Dec 18, 2020
JsonNet nuget is versioned separately from UnitsNet nuget, but they share major version. |
Add IDecimalQuantity interface to expose the decimal value
Serialize decimal values as string to keep number of decimal places