-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
I came across an issue using JsonDeserializer when the data I needed to parse had the value "4.8e-04" for a decimal property. Currently a FormatException is thrown. As the below SO post indicates, NumberStyles.Float needs to be passed as the second parameter to Decimal.Parse().
http://stackoverflow.com/questions/3879463/parse-a-number-from-exponential-notation
Maybe in ConvertValue(), under "if (type == typeof(Decimal)" it could check if stringValue contains "e" ... and if so, return Decimal.Parse(stringValue, NumberStyles.Float);
Metadata
Metadata
Assignees
Labels
No labels