question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use UnixDateTimeConverter as it is marked as internal

See original GitHub issue

UnixDateTimeConverter looks to be an internal class, so we can’t access it in the way you suggest.

image


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ealsurcommented, Jul 15, 2021

@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

0reactions
ealsurcommented, Aug 2, 2021

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 Newtonsoft UnixDateTimeConverter or just getting the integer value (the JSON is just a number).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found