Setting PropertyNamingPolicy to CamelCase caused deserialization to fail #2369
Unanswered
aaronpowell
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This was tested on the
v4
branch at commit d706a6d, but can be replicated with 4.0.0-preview3I have a CosmosDB with documents that have camel-cased fields like
id
,modelType
,state
, etc. and want to have them deserialized to .NET types with standard .NET naming conventions ofId
,ModelType
,State
, etc.When setting the
PropertyNamingPolicy
on theCosmosClientOptions
the application fails to run, with an error inprivate IReadOnlyList<T> CreateQueryFeedResponseWithSerializer<T>
with thefeedResponse.Value
beingnull
.Here's a sample document:
And working code:
But if I change it to this, it'll error:
Is this not how you're meant to override serialisation?
Beta Was this translation helpful? Give feedback.
All reactions