Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON.DeserializeDynamic throws ArgumentException #316

Closed
Metalnem opened this issue Dec 24, 2018 · 2 comments
Closed

JSON.DeserializeDynamic throws ArgumentException #316

Metalnem opened this issue Dec 24, 2018 · 2 comments

Comments

@Metalnem
Copy link

@Metalnem Metalnem commented Dec 24, 2018

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.

@Tornhoof
Copy link

@Tornhoof Tornhoof commented Dec 24, 2018

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.

@Metalnem
Copy link
Author

@Metalnem Metalnem commented Dec 24, 2018

Yes, but in all other scenarios Jil throws DeserializationException, so I would expect it to either not throw, or throw DeserializationException, not ArgumentException.

kevin-montrose added a commit that referenced this issue Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants