Am I correct in assuming that I have to MANUALLY convert Json-encoded date strings to date objects in my client code?
Coming from C#, I took for granted that this was happening automatically, but I guess that was .NET.
Is there a built in mechanism for getting native javascript types from a Json string (for dates, ints, etc.)?
Thanks.
The JSON spec does not define a date data type. That is left up to you.
See Section A.8: http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf
JSON does not have a standard date type. There are various libraries (including .NET) with incompatible extensions for representing it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With