Yahoo! UI Library

querystring  3.2.0

Yahoo! UI Library > querystring > QueryString
Search:
 
Filters

static Class 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.

Methods

stringify

static void stringify ( obj , cfg )

Converts a simple object to a Query String representation.

Nested objects, Arrays, and so on, are not supported.

Parameters:
obj <Object> A single-level object to convert to a querystring.
cfg <Object> (optional) Configuration object. In the simple module, only the arrayKey setting is supported. When set to true, the key of an array will have the '[]' notation appended to the key;.


Copyright © 2010 Yahoo! Inc. All rights reserved.