Re: File extension for PHP's serialization format?
| From: | Alister Bulman | Date: | Fri, 27 Oct 2006 10:06:10 +0000 |
| Subject: | Re: File extension for PHP's serialization format? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243737@lists.php.net to get a copy of this message | ||
On 27/10/06, Stut <stuttle@gmail.com> wrote:
Hamish Lawson wrote: I have a web application (not written in PHP) that can return data in various formats, including JSON and PHP's serialization format. At the moment my URL scheme looks like this:I know of one website (Livejournal) that has /url.../data/rss or /data/atom etc. /data/php, /data/wddx or /data/json are pretty obvious extensions to that. That said, since all are them are designed for a script to consume, and not a person, I'd call them entirely 'clean' and obvious enough for the task, though ultimately, it's about having a pretty URL, as the program that reads it won't care what the extension is, if any, and people won't be typing it in regularly anyway. Alisterstaff/engineering?format=jsonbut I'd like to switch to using a file extension to denote the format:staff/engineering.jsonGiven that file extensions are purely for association purposes and no application I am aware of knows what to do with PHP serialised data, personally I would use .dat. Or, if I wanted it to be more descriptive, something like .phpdata. But to be perfectly frank it doesn't matter.