JWambaugh / TJSON

The tolerant JSON parser for Haxe
78 stars 25 forks source link

Fixed parsing for Date objects. #20

Closed ciscoheat closed 9 years ago

ciscoheat commented 9 years ago

Date objects always were encoded into empty objects (at least on the js target), so here's a cross-platform fix for them.

ciscoheat commented 9 years ago

@martamius Any chance this will be merged?

profelis commented 9 years ago

I can't find here http://www.json.org/ info about Date format in json. Maybe you can store serialized string in json and after unserialize it?

ciscoheat commented 9 years ago

Yes, there is no JSON Date standard, so that's what this patch is for, doing it automatically. Without it, the Haxe Date objects are encoded/decoded into empty objects.

JWambaugh commented 9 years ago

Sorry, this got lost in my inbox... I've gone ahead and merged it as I feel this is a useful feature! I have added a unit test for it as well. Please try to include unit tests in the future.

Thanks!

ciscoheat commented 9 years ago

Sure, I'll do that. Thanks!