Fix JSON serialization of quantities with decimal values#868
Fix JSON serialization of quantities with decimal values#868angularsen merged 1 commit intoangularsen:masterfrom
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.
|
|
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
c5af7a1
Compare
|
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
e9a8161
Compare
angularsen
left a comment
There was a problem hiding this comment.
Looks perfect to me, great work on this!
|
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! 🙇 |
|
Why is the version number 4.3.0? |
|
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