2 ms·
I don't consider ! to be a fancy control character. It's just simple. Outputing/requiring json adds extra complexity and restriction that isn't necessary. Alth
by jazzychad 17y ago
I don't consider ! to be a fancy control character. It's just simple.
Outputing/requiring json adds extra complexity and restriction that isn't necessary. Although, nothing says you can't send the messages as json (which is, in fact, what I do in my applications!). Letting the message format be completely free-form means you can treat it however you like.
The idea was to make it incredibly simple, and abstract enough (meaning no extra/unneeded logic baked in) so that it could be used in the widest set of applications. The application you build with it may well use json as its message format, but I saw no need to require a certain format.
Here is an example of a message I'm using in the 4squrevision example:
4sq_checkins!{"iid":17295,"tid":13057779551,"location":"Maths Journey","sqlink":"http://4sq.com/cGG46G","user":"greeenpea","lat":null,"tstamp":"Thu Apr 29 08:20:33 +0000 2010","lng":null}
Simple.