JSON.DeserializeDynamic throws ArgumentException
Metalnem opened this issue · comments
Nemanja Mijailovic commented
JSON.DeserializeDynamic throws an ArgumentException when deserializing the file from the attached archive. You can run the following code to reproduce it (the path variable should contain the path to the extracted file):
using (var file = File.OpenText(path))
{
JSON.DeserializeDynamic(file);
}
Found via SharpFuzz.
Stefan commented
Your input file has the member pop
twice, as stated in the exception (duplicate Key) and according to https://tools.ietf.org/html/rfc8259#section-4 this behaviour is undefined.
Nemanja Mijailovic commented
Yes, but in all other scenarios Jil throws DeserializationException, so I would expect it to either not throw, or throw DeserializationException, not ArgumentException.