Uh oh!
There was an error while loading. Please reload this page.
.Net: Fix #10389 - #10406
Conversation
Use `JsonSerializerOptions.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping`
SergeyMenshykh
commented
Feb 5, 2025
Hi Ram.Type-0 (@RamType0), thanks for submitting the PR. We are evaluating the fix along with an alternative solution that would allow for customizing the function result serialization process. Please bear with us; it shouldn't take long. |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Ram.Type-0 (RamType0)
commented
Feb 5, 2025
Why you think that we will use the function result for HTML rendering directly? I could not imagine that scenario.
Customization feature is good, but I think this should be the default behavior. Many alphabet speaker programmers previously made many bugs with multi byte characters. |
Dmytro Struk (dmytrostruk)
commented
Feb 5, 2025
Ram.Type-0 (@RamType0) Thanks for your response! My comment is outdated now, SergeyMenshykh will provide more details soon. |
SergeyMenshykh
commented
Feb 7, 2025
Hi Ram.Type-0 (@RamType0), we plan to proceed with merging this PR, but before that, please cover the change with unit test(s). |
SergeyMenshykh
commented
Feb 7, 2025
Linking this PR to the M.E.AI one: Use unsafe relaxed escaping in AIJsonUtilities.DefaultOptions as both address the same issue |
Ram.Type-0 (RamType0)
commented
Feb 7, 2025
@microsoft-github-policy-service agree |
Uh oh!
There was an error while loading. Please reload this page.
### Motivation and Context Fixes issue microsoft#10389. ### Description Use `JsonSerializerOptions.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping` to generate more LLM friendly serialized FunctionResult. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 --------- Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>

Motivation and Context
Fixes issue #10389.
Description
Use
JsonSerializerOptions.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscapingto generate more LLM friendly serialized FunctionResult.Contribution Checklist