Answer the question
In order to leave comments, you need to log in
How to disable changing DateTime data when fetching it from JObject.Parse?
Welcome all.
There is json, it has an item with a date, of the format: "2019-04-07T07:00:00.000+0000"
When using (VB.NET):
Dim jsonObject As JObject = JObject.Parse(jsonURL)
Dim jsonArray As JArray = JArray.Parse(jsonObject.SelectToken("items").ToString())
Answer the question
In order to leave comments, you need to log in
In general JObject.Parse there are no functions and methods to disable forced date transformation when parsing, unlike JsonConvert.DeserializeObject and the DateParseHandling.None method.
But you can apply a hack to JObject.Parse, before passing the json file to JObject.Parse, add any stroke to the dates (for example: a dash at the beginning of the date) and so that JObject.Parse cannot transform the dates. And then, when selecting a token with a date, remove the unreadable stroke and work with the date normally.
Thank you all for your help!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question