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.61k
forks
source link
[FEATURE REQ] [Tables] More direct deserialization #37197
Would be less CPU cycles and RAM if response stream could be passed to custom JSON Serializer that would handle final type creation and pushing data into object.
Context
As of now for example in case of GetEntityAsync<TableEntity> we get:
creation of Azure.Response
from that JsonDocument is created
immediately Dictionary<string, object> is created as holder of prev JSON props
there are some shenanigans with "translating" odata props
and final TableEntity is created and properties are copied
Proposal
Option to make call GetEntityAsync<MyEntity>(jsonSerializer, partitionKey, rowKey) and the following happen:
creation of Azure.Response
creation of MyEntity and pushing members by serializer
Library name
Azure.Data.Tables
Please describe the feature.
Would be less CPU cycles and RAM if response stream could be passed to custom JSON Serializer that would handle final type creation and pushing data into object.
Context
As of now for example in case of
GetEntityAsync<TableEntity>
we get:Azure.Response
JsonDocument
is createdDictionary<string, object>
is created as holder of prev JSON propsTableEntity
is created and properties are copiedProposal
Option to make call
GetEntityAsync<MyEntity>(jsonSerializer, partitionKey, rowKey)
and the following happen:Azure.Response
MyEntity
and pushing members by serializer