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

[#6885] Fix MemoryStream Converter when serializing #6888

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sw-joelmut
Copy link
Collaborator

Fixes #6885

Description

This Pr fixes an issue when adding and removing the converter to the JsonSerializer over multiple threads, causing fail due to null assignment.

Specific Changes

  • Replaced WriteJson functionality from assigning the converter recursively to instead call the WriteJson recursively to serialize the object.
  • Updated HaveStreams method to work with both Read and Write json.
  • WriteJson and HaveStreams methods now share similar behavior, detecting Dictionaries, Collections, and Classes separately.

Testing

The following image shows the unit tests continue working correctly.
imagen

@sw-joelmut sw-joelmut requested a review from tracyboehrer April 1, 2025 13:11
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.

#6850 Causes Null Reference Exception If Attachment Content Gets Into BotState
2 participants