Thursday, January 18, 2007


JSON support in EJAX

EJAX has now support for JSON output. I recently had a real need for this when I had a page that was rendered differently depending on if the user was logged on or not. Using my optional login technique I could not simply depend on the browser returning an optional Authentication header. This can be faked, because for optional authentication the browser always send this header, but the server doesn't validate it.

So the parts of the page where personal information was shown was loaded using a script tag which got its information from a protected part of the site, where the Authentication header was really checked. This part returned JSON wrapped in a callback function. Works great.

The JSON is returned by simply emitting the result of a SQL call (using ECLI) as JSON.

1)It's Open source?
2)Where I can find this project?
3)Can you show us some examples?
EJAX is a project I have been talking about on these pages :-)

There's no release. Not sure if there ever will be. I'm prone to change things at the moment. But browse this site for discussion and examples.
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?