URL Encoded Data
From GeoJSON
Revision as of 08:20, 15 March 2007 by Ajturner (Talk | contribs) (New page: URL Encoded Data is a Javascript library for converting an array into a URL. This could be useful for passing geographic requests using GeoJSON arrays. <code><pre> //The JS Array format o...)
URL Encoded Data is a Javascript library for converting an array into a URL. This could be useful for passing geographic requests using GeoJSON arrays.
//The JS Array format of the example given above
var arr = {
'name':"Binny",
'year':2007,
'quote':"Hello, World!",
'os':['Windows','Linux','Mac'],
'software':{
'editor':"vi",
'audio':"xmms",
'video':"vlc"
}
}
var data = ued_encode(arr);
Results in:
http://www.example.com/get_data.php?name=Binny&year=2007&
quote=Hello%2C+World%21&os[]=Windows&os[]=Linux&os[]=Mac&
software[editor]=vi&software[audio]=xmms&software[video]=vlc