The uploaded file

    CGI-Application-Plugin-JSON-0.2.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/W/WO/WONKO/CGI-Application-Plugin-JSON-0.2.tar.gz
  size: 4567 bytes
   md5: 2520e065600a002b3c1d370d91cc3d9c


NAME
    CGI::Application::Plugin::JSON - easy manipulation of JSON headers

SYNOPSIS
        use CGI::Application::Plugin::JSON ':all';

        # add_json_header() is cumulative
        $self->add_json_header( foo => 'Lorem ipsum...');
        $self->add_json_header( bar => [ 0, 2, 3, 4 ] );
        $self->add_json_header( baz => { stuff => 1, more_stuff => 2 } );

        # json_header() is not cumulative
        $self->json_header( foo => 'Lorem ipsum...');

        # in case we're printing our own headers
        print "X-JSON: " . $self->json_header_string();

        # clear out everything in the outgoing JSON headers
        $self->clear_json_header();

        # or send the JSON in the document body
        $self->json_body( { foo => 'Lorem ipsum', bar => [ 0, 2, 3 ] } );

DESCRIPTION
    When communicating with client-side JavaScript, it is common to send
    data in "X-JSON" HTTP headers or through the document body as
    content-type "text/x-json".

    This plugin adds a couple of convenience methods to make that just a
    little bit easier.


-- 
Michael Peters
Developer
Plus Three, LP


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to