-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ServiceTagsListResult POCO has wrong field types #46767
Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
Hi @kennyvanle we would like to know where the issue was. FYI I tried to call this, but since my test subscription actually does not have a thing, therefore it always gives me nothing in the result therefore I cannot reproduce, and that is why your request log could be important. |
@ArcturusZhang i am actually reading the data from service tag downloadable files here: aka.ms/servicetags which contains the JSONs. From API response it looks okay. Seems like the issue is with whenever the file is getting published |
Thank you @kennyvanle . I see. |
Thank you! Please keep me updated. Updating the deserialization to handle both would be great since there are limitations with adding custom converters. |
Hey @ArcturusZhang any update on this? |
* Fix and add test * Update CHANGELOG.md * Update Azure.ResourceManager.Network.csproj * Update UnitTest.cs * Update sdk/network/Azure.ResourceManager.Network/tests/Tests/UnitTest.cs Co-authored-by: Dapeng Zhang <ufo54153@gmail.com> * Update sdk/network/Azure.ResourceManager.Network/tests/Tests/UnitTest.cs Co-authored-by: Dapeng Zhang <ufo54153@gmail.com> --------- Co-authored-by: Dapeng Zhang <ufo54153@gmail.com>
Type of issue
Code doesn't work
Description
I am trying to deserialize the ServiceTagsListResult object from service tag downloadable files here: aka.ms/servicetags
The POCOs listed in the documentation and in code for the ServiceTagsListResult and the child objects are listing all of the numeric fields as strings. For example:
source code
This is causing an issue when deserializing the IJsonModel object using the following recommended patterns from the azure github sample ModelReaderWriter.md
This is an issue as System.Json.Text won't allow us to convert Numbers -> String without manual converters, but the usage of JsonModelConverter causes all other converters to be ignored so we cannot use a custom converter on top of this.
My request is to update the POCOs with the proper type to match the json objects stored in the service tags.
Page URL
https://learn.microsoft.com/en-us/dotnet/api/azure.resourcemanager.network.models.servicetagslistresult?view=azure-dotnet
Content source URL
https://github.com/Azure/azure-docs-sdk-dotnet/blob/master/xml/Azure.ResourceManager.Network.Models/ServiceTagsListResult.xml
Document Version Independent Id
fdb8b0d7-0fc5-a5c2-8f88-265f19f77e38
Article author
@azure-sdk
Metadata
The text was updated successfully, but these errors were encountered: