You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, indeed - using a default value for missing properties is the way we went in #985 and #990 (WIP - I'll try to get it out for the start of the new year).
Not sure how to deal with the existing converter- I guess an exception should be thrown somewhere along the way..
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
When deserializing "malformed", non-round-trip JSON where unexpected values are encountered, a stack overflow occurs.
For example, when deserializing the following JSON to an object where both properties are
Power
then the latter triggers an infinite loop in this code:
UnitsNet/UnitsNet.Serialization.JsonNet/UnitsNetIQuantityJsonConverter.cs
Lines 66 to 69 in 47cdd1f
I guess there could be a nicer way of handling this. Maybe interpreting the value as the base unit of
Power
or throwing an exception?Also, thanks for making this great library! 👍
The text was updated successfully, but these errors were encountered: