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

.Net: Delete duplicative Json.ToJson #3190

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Conversation

stephentoub
Copy link
Member

Description

The implementation of this method is identical to that of Serialize.

Also, one of the uses of Serialize immediately converted it to UTF8 bytes. JsonSerializer actually has to do more work to produce a string, as it first generates UTF8 and then transcodes, so we may as well just skip the intermediate string.

Contribution Checklist

The implementation of this method is identical to that of Serialize.

Also, one of the uses of Serialize immediately converted it to UTF8 bytes. JsonSerializer actually has to do more work to produce a string, as it first generates UTF8 and then transcodes, so we may as well just skip the intermediate string.
@stephentoub stephentoub requested a review from a team as a code owner October 15, 2023 03:55
@shawncal shawncal added .NET Issue or Pull requests regarding .NET code kernel.core labels Oct 15, 2023
@github-actions github-actions bot changed the title Delete duplicative Json.ToJson .Net: Delete duplicative Json.ToJson Oct 15, 2023
@stephentoub stephentoub added this pull request to the merge queue Oct 16, 2023
Merged via the queue into microsoft:main with commit c3a7ab3 Oct 16, 2023
20 checks passed
@stephentoub stephentoub deleted the jsondup branch October 16, 2023 13:21
SOE-YoungS pushed a commit to SOE-YoungS/semantic-kernel that referenced this pull request Nov 1, 2023
### Description

The implementation of this method is identical to that of Serialize.

Also, one of the uses of Serialize immediately converted it to UTF8
bytes. JsonSerializer actually has to do more work to produce a string,
as it first generates UTF8 and then transcodes, so we may as well just
skip the intermediate string.

### 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 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants