You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got this strange issue when deserialising a fairly large (32768 bytes = 2^15) amount of JSON.
The issue I have is that the deserialisation fails when the content is exactly this size. The same if I have exactly 65536. Just one byte more or less and it is fine.
If I set the JsonSerializerOptions.DefaultBufferSize to something bigger than the content then it all works fine.
So the issue seems to be due to partial JSON.
I don't have the full stack trace, but this is the Exception message:
'Cannot skip tokens on partial JSON. Either get the whole payload and create a Utf8JsonReader instance where isFinalBlock is true or call TrySkip.'
I'm sorry, I don't have full example or details at the moment. The content being deserialised is fairly complex, and has a list of polymorphic types using the Discriminator. I've tried to create a basic example without polymorphism, but it doesn't have this same issue.
The text was updated successfully, but these errors were encountered:
I've got this strange issue when deserialising a fairly large (32768 bytes = 2^15) amount of JSON.
The issue I have is that the deserialisation fails when the content is exactly this size. The same if I have exactly 65536. Just one byte more or less and it is fine.
If I set the
JsonSerializerOptions.DefaultBufferSize
to something bigger than the content then it all works fine.So the issue seems to be due to partial JSON.
I don't have the full stack trace, but this is the Exception message:
I'm sorry, I don't have full example or details at the moment. The content being deserialised is fairly complex, and has a list of polymorphic types using the Discriminator. I've tried to create a basic example without polymorphism, but it doesn't have this same issue.
The text was updated successfully, but these errors were encountered: