-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Exception thrown "The converter 'Schema.NET.ValuesJsonConverter' read too much or not enough." #417
Comments
Not sure what is going on there - maybe an issue with the encoding/unicode but at the same time, I kinda doubt it as I'd imagine the core runtime is pretty rock solid around Unicode handling by now. One part that does strike me as odd is this: |
@dermotblairca Does it work if you remove that piece of the JSON? Can you slowly remove bits of the JSON to narrow down the part causing the issue? |
Thanks for your suggestions both! Yes it is the "review" property, it works fine without this. I have updated the issue with a smaller piece of json that reproduces it. |
Thanks for helping to narrow things down. The stack trace suggests that this is a problem deep in System.Text.Json, so it may be worth searching for an issue there or maybe raising a new one and linking here, so we can track it. |
Yes I will search for an issue there or else I will create one and link it back here. Thanks. |
I couldn't find a similar issue on dotnet repo so I tried to reproduce the issue just using System.Text.Json. However it seems to work ok with the simple example below. It deserializes the json fine:
I am using .Net Core 6.0 and System.Text.Json 6.0 |
Describe the bug
When deserializing certain json from websites, SchemaSerializer.DeserializeObject throws the following exception "The converter 'Schema.NET.ValuesJsonConverter' read too much or not enough.".
This is being thrown from System.Text.Json with the following stack trace
Steps to reproduce
Run the following unit test:
I got the above json from the following webpage: https://www.nahdionline.com/ar/koleston-hair-color-natural-black-developer-302-0
Schema.org validator does not show any issues with it: https://validator.schema.org/#url=https%3A%2F%2Fwww.nahdionline.com%2Far%2Fkoleston-hair-color-natural-black-developer-302-0
Expected behaviour
SchemaSerializer.DeserializeObject returns an object and does not throw an exception.
Schema objects
https://schema.org/Product (but affecting all objects)
The text was updated successfully, but these errors were encountered: