I am using Newtonsoft.Json to serialize my dates from C # to javscript, what I want to do is use the json serializer for the current date to format the dates in a string
Here is what I get from my Json serializer:
JsonConvert.SerializeObject(DateTime.Now);
result:
"2016-07-08T17:10:17.6722753-05:00"
But I prefer:
"08/07/2016 17:10:57"
Because my current culture is Brazilian and I want my dates to be displayed higher.
Is it possible globally (for any date that can be serialized) tell json serializer in Newtonsoft.Json to use it as if it were date.ToString() (since ToString respects the culture in System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat and gives the appropriate format)
Amete blessed
source share