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.47k stars 4.8k forks source link

[FEATURE REQ] Finalize on API for ModelReaderWriter integration with JsonSerializer #40778

Open m-nash opened 11 months ago

m-nash commented 11 months ago

Library name

System.ClientModel

Please describe the feature.

For the initial release we are making JsonModelConverter internal. The following discussion needs to be resolved before we make it public again. https://github.com/Azure/azure-sdk-for-net/pull/40766#discussion_r1425870473

AtOMiCNebula commented 7 months ago

@m-nash, Is there an expectation of when this will be addressed and the model types will be linked up with [JsonConverter]s? I've brought this up in various issues here for over a year now (like in https://github.com/Azure/azure-sdk-for-net/issues/25699#issuecomment-1363429831), but ResourceGraph returns a payload of a serialized list of resources (essentially IList<KeyVaultData> instead of KeyVaultData), and ModelReaderWriter can't currently handle that (AFAICT). Integrating with JsonConverter would though, especially if the model types had the attribute on them (so I don't have to provide my own Options).

I just noticed this because Azure.ResourceManager.KeyVault shipped a stable update with the new model serialization/deserialization in it, and I was sad that it still can't meet my needs (again, AFAICT). 😞

annelo-msft commented 4 weeks ago

@m-nash, has this issue been completed now that JsonModelConverter has shipped in SCM?