Open rnikitin opened 11 years ago
Hi, rnikitin.
Now best way to use Date
with JSON is use string
in model and parse it on server. But I'll try to study your problem more closely.
The new NuGet-package will be soon.
That looks a way I fixes this, but I used an int to store milliseconds.
BTW, found, that Serialization and Deserialization pretty slow and with 20-30 entities it took about 1 second to serialize -> deserialize -> serialize to client again.
Tried to replace this serialization to Json.Net - no luck. I think, that ConvertData, which uses reflections, isn't too fast. Is there any way to rewrite it or to throw it away?
Hmm... Ok, I will research this question.
it's not an issue with KnockoutUtilities but a javascript one. as Andrey said, the best way to avoid this is to convert it to string
Anyway the best way is to use proper serializer/deserializer like json.NET.
I tried to work with Model, containing Data.
The format I received from server with first request: /Date(1354656075282)\/"} While executing it sends with correct format. But when it returned back from server side: /Date(-62135596800000)/
I cheched with debugger - on server side the field already lost. So, it could be a problem somewhere in KnockoutUtilities.ConvertData.
Could somebody reproduce this issue?
BTW, please send to NuGet fresh version of the library :)