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

Issue2632 #2633

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Issue2632 #2633

wants to merge 3 commits into from

Conversation

ermagana
Copy link

@ermagana ermagana commented Jan 2, 2022

This pull request resolves Issue #2632 and moves back to the behavior that was expected during version 11.0.2 and prior.

Technical Details:

  • throw JsonReaderException.Create(this, "Cannot read number value as type."); was not setting SetToken(JsonToken.Undefined, null, false);
  • this would cause the Read() operation to become misaligned and the subsequent property would end up with a throw JsonSerializationException.Create(reader, "Unexpected token when deserializing object: " + reader.TokenType); inside of the PopulateObject method in JsonSerializeInternalReader.cs

Erik Magana added 3 commits January 2, 2022 02:30
…ception and allow deserialization to continue
- Deserializes an array with objects that match a DateTime property.
- Verifies deserialization creates an array with X number of entries (in this case it is 1)
- Utilizes the approach used in WebAPI as that is where the issue was first being observed

Additionally, updated existing tests for Issue JamesNK#1778, which originally created the regression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant