Personally i loved the 'json in header' feature, it allowed me to have
large quantities of html in the responce body, and some params, or other
divs to update, etc in the x-json header .. 

Worked out much better then having to xml parse the responce body into
sepperate entities :-) (like openrico.org does forinstance)

        -- Chris

On Sun, 2006-05-28 at 08:48 -0700, John Wang wrote:
> X-JSON is the name of the custom header, not a content-type so
> header("Content-Type: X-JSON") won't work. You need the X-JSON header
> set to the JSON string. In PHP, do the following:
> 
>     header("X-JSON: $json");
> 
> I use Catalyst with the following. It's pretty similar to the PHP code
> so I expect that to work for you.
> 
>     $c->res->headers->header( 'X-JSON' => $json );
> 
> On a side note. Is X-JSON a standard or just for prototype? The JSON
> response can be pretty large. Is stuffing a header a good
> implementation?
> 
> HTH,
> John
> _______________________________________________
> Rails-spinoffs mailing list
> [email protected]
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to