Skip to content

Remove Dependency on Newtonsoft.Json From Protocol objects#1198

Merged
AArnott merged 3 commits intomicrosoft:mainfrom
eerhardt:RefactorJsonRpcObjectToString
Jun 17, 2025
Merged

Remove Dependency on Newtonsoft.Json From Protocol objects#1198
AArnott merged 3 commits intomicrosoft:mainfrom
eerhardt:RefactorJsonRpcObjectToString

Conversation

@eerhardt
Copy link
Copy Markdown
Member

When trimming or native AOT'ing an app, we want to remove Newtonsoft.Json dependencies when possible because it brings in a lot of AOT warnings and adds a lot of size to the final app.

Begin by removing these simple cases in the ToStrings of JsonRpcError, Request, and Result. ToString methods of instantiated types can never be trimmed, so the code in them is always preserved.

cc @AArnott

eerhardt added 2 commits June 13, 2025 10:11
When trimming or native AOT'ing an app, we want to remove Newtonsoft.Json dependencies when possible because it brings in a lot of AOT warnings and adds a lot of size to the final app.

Begin by removing these simple cases in the ToStrings of JsonRpcError, Request, and Result. ToString methods of instantiated types can never be trimmed, so the code in them is always preserved.
Copy link
Copy Markdown
Member

@AArnott AArnott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good.

Comment thread test/StreamJsonRpc.Tests/Protocol/JsonRpcRequestTests.cs Outdated
Copy link
Copy Markdown
Member

@AArnott AArnott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/azp run

@AArnott
Copy link
Copy Markdown
Member

AArnott commented Jun 17, 2025

/azp run

@AArnott AArnott enabled auto-merge June 17, 2025 15:51
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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.

2 participants