RicoSuter/NJsonSchema

InvalidCastException on validation of JToken containing BigInteger

Aperta

#568 aperta il 25 nov 2017

 (11 commenti) (0 reazioni) (0 assegnatari)C# (549 fork)github user discovery
help wantedtype: bug

Metriche repository

Star
 (1581 stelle)
Metriche merge PR
 (Merge medio 39g 6h) (1 PR mergiata in 30 g)

Descrizione

Validation of JToken containing System.Numeric.BigInteger leads to InvalidCastException with message: "Object must implement IConvertible.". Exception is thrown on line 289 of JsonSchemaValidator(var value = token.Value();) in method "ValidateNumber".

That's a bug because instead of receiveng error you need to handle this exception in your code.

Guida contributor