RicoSuter/NJsonSchema

InvalidCastException on validation of JToken containing BigInteger

Ouverte

#568 ouverte le 25 nov. 2017

 (11 commentaires) (0 réaction) (0 personne assignée)C# (550 forks)github user discovery
help wantedtype: bug

Métriques du dépôt

Stars
 (1 581 étoiles)
Métriques de merge PR
 (Merge moyen 39j 6h) (1 PR mergée en 30 j)

Description

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.

Guide contributeur