1 # <a name="Package <code>="></a> Package =
5 <li><a href="#Package =="> Package ==</a></li>
11 CGI::Session::Serialize::json - serializer for CGI::Session
15 This library can be used by CGI::Session to serialize session data. Requires L<JSON::Syck|JSON::Syck>. JSON is a type of L<YAML|CGI::Session::Serialize::yaml>, with one extension: serialized JSON strings are actually valid [[JavaScript]] code that a browser can execute. Any langauge that has a YAML parser (Perl, PHP, Python, Ruby, C, etc) can also read data that has been serialized with JSON.
21 =item freeze($class, \\%hash)
23 Receives two arguments. First is the class name, the second is the data to be serialized. Should return serialized string on success, undef on failure. Error message should be set using C<set\_error()|CGI::Session::ErrorHandler/"set\_error()">
25 =item thaw($class, $string)
27 Received two arguments. First is the class name, second is the I data string. Should return thawed data structure on success, undef on failure. Error message should be set using C<set\_error()|CGI::Session::ErrorHandler/"set\_error()">
33 L<CGI::Session>, L<JSON::Syck>.