Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.26k stars 4.6k forks source link

Use Utf8JsonWriter.WriteRawValue instead of JsonSerializer.Serialize #46023

Open annelo-msft opened 4 days ago

annelo-msft commented 4 days ago

In Azure.Core shared source file RequestContentHelper.cs and SCM-based model types, we multitarget and on platforms lower than net6.0, we call JsonSerializer.Serialize instead of Utf8JsonWriter.WriteRawValue.

We should be able to call Utf8JsonWriter.WriteRawValue on all platforms.

@m-nash, @jsquire, @KrzysztofCwalina FYI

github-actions[bot] commented 4 days ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.