Yahoo! UI Library

querystring  3.1.0

Yahoo! UI Library > querystring
Search:
 
Filters

Module: querystring

The QueryString module adds support for serializing JavaScript objects into query strings and parsing JavaScript objects from query strings format.

The QueryString namespace is added to your YUI instance including static methods Y.QueryString.parse(..) and Y.QueryString.stringify(..).

The querystring module is a rollup of querystring-parse and querystring-stringify.

As their names suggest, querystring-parse adds support for parsing Query String data (Y.QueryString.parse) and querystring-stringify for serializing JavaScript data into Query Strings (Y.QueryString.stringify). You may choose to include either of the submodules individually if you don't need the complementary functionality, or include the rollup for both.

This module contains the following classes:

Submodules:

querystring-parse-simple

Provides Y.QueryString.stringify method for converting objects to Query Strings. This is a simpler implementation than the full querystring-stringify.

Because some things may require basic query string escaping functionality, this module provides the bare minimum functionality (decoding a hash of simple values), without the additional support for arrays, objects, and so on.

This provides a friendly way to deserialize basic query strings, without necessitating a lot of code for simple use-cases.

querystring-parse
Provides Y.QueryString.unescape method to be able to override default decoding method. This is important in cases where non-standard delimiters are used, if the delimiters would not normally be handled properly by the builtin (en|de)codeURIComponent functions. Default: replace "+" with " ", and then decodeURIComponent behavior.
querystring-stringify-simple

Provides Y.QueryString.escape method to be able to override default encoding method. This is important in cases where non-standard delimiters are used, if the delimiters would not normally be handled properly by the builtin (en|de)codeURIComponent functions.

Default: encodeURIComponent
querystring-stringify
Provides Y.QueryString.escape method to be able to override default encoding method. This is important in cases where non-standard delimiters are used, if the delimiters would not normally be handled properly by the builtin (en|de)codeURIComponent functions. Default: encodeURIComponent

Copyright © 2010 Yahoo! Inc. All rights reserved.