NameValuePairs - Global

Converts between maps and strings representing the name/value pairs in the map.

The string form is: <name> = <value>, <name> = <value, ... where <name> is a string name, optionally surrounded by double quotes (Microsoft-style), and <value> is a string value, also optionally surrounded by double quotes.

The following are all examples of valid name/value strings:
  • name = value
  • name = "My Value", name = value
  • "My Name = this" = "My Value", "My Value, all the time", name = value
  • "My Name" = "This" "name""", name = value
In the third example, the quoted values contain equals and commas. In the fourth example, the quoted value contains a quote.
Instances have the following properties initialized:
  • map: the map (JavaScript object being used as a hashmap) form of the name/value pairs, with Microsoft-style quotes removed
  • string: the string form of the name/value pairs, with Microsoft-style quoting.

Use with any server-side script where you need convert name/value pairs between maps and strings.