Re: 30x faster JSON date parsing
Re: 30x faster JSON date parsing
- Subject: Re: 30x faster JSON date parsing
- From: Rick Mann <email@hidden>
- Date: Mon, 09 Sep 2013 11:51:27 -0700
On Sep 9, 2013, at 11:46 , Tom Davie <email@hidden> wrote:
> On 9 Sep 2013, at 20:29, Rick Mann <email@hidden> wrote:
>
>>
>> On Sep 9, 2013, at 09:25 , Maxthon Chan <email@hidden> wrote:
>>
>>> This may not be that useful in all circumstances - I always send dates as milliseconds since the UNIX epoch as 64-bit signed integers. Those are *way* faster to parse.
>>
>> Yes. It's ridiculous that a lot of JSON APIs send ISO 8601-formatted (or other human-readable format) dates.
>
> Yes, it absolutely is, when no human is going to read them.
No human (user) *should* be reading data like that unmodified out of JSON. It's not enough to claim it makes development easier. But pre-formatting the strings for direct display guarantees a parsing requirement for a great many consumers. Date formats vary widely based on localization and the elegance of the UI (relative dates, for example, require parsing and then math).
I'm generally opposed to non-binary protocols at all, but it's made worse when you have to parse something like a formatted date, especially when there's no guarantee of stability.
--
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden