Unable to use UnixDateTimeConverter as it is marked as internal
See original GitHub issueUnixDateTimeConverter
looks to be an internal class, so we can’t access it in the way you suggest.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 4705078b-fbc5-05e2-91c5-4e73d4f54563
- Version Independent ID: c3c064db-c70b-b441-62e2-93ce6c297b42
- Content: ContainerProperties.LastModified Property (Microsoft.Azure.Cosmos) - Azure for .NET Developers
- Content Source: xml/Microsoft.Azure.Cosmos/ContainerProperties.xml
- Service: cosmos-db
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Consider making UnixDateTimeConverter configurable ...
Yes, many of the types used in the existing implementation are marked internal so copying it isn't straightforward.
Read more >ASP.NET 3.0. Date in seconds cannot be converted from ...
Message type belongs to Update one as a property. And date there is marked with UnixDateTimeConverter : [JsonProperty(Required = Required.Always) ...
Read more >c# - Can I specify a path in an attribute to map a property in ...
I tried your solution, since I'm using a UnixDateTimeConverter attribute on a property, but I get a JsonSerializationException: "Unexpected ...
Read more >Untitled
NET Install - Newtonsoft WebJan 13, 2022 · UnixDateTimeConverter throws "Value ... NET DateTime/Unix time converter, here's a sample code, using Newtonsoft.
Read more >Introduction to Azure Cosmos DB | Microsoft Docs
As a globally distributed database service, Azure Cosmos DB provides the following capabilities to help you build scalable, globally distributed, highly ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chris31389 can you share a code example? I don’t think it is meant to be used publicly. Newtonsoft.Json has a similar type that you could use? https://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_Converters_UnixDateTimeConverter.htm
Closing as non-actionable. The ContainerProperties is a class from the SDK, not part of any documentation that is telling users to use
Microsoft.Azure.Documents.UnixDateTimeConverter
, there is no need to change the definition of this class.Users when defining their own models can deserialize
_ts
in any way they want, including using the NewtonsoftUnixDateTimeConverter
or just getting the integer value (the JSON is just a number).