Hi
Yes you are right.
I read documentation, and it's obvious that first param is qx.core.Object.
I also checked source of qx.util.Serializer and I noticed that toJson
method is "more liberal".
I know that these methods were first intended to get params from widgets.
But few months ago I needed a quick way of geting Json from native object
and
qx.util.Serializer.toJson worked just fine.
A few days ago I had a need for something like:
var parStr=qx.util.Serializer.toUriParameter({par1: 1,par2: 55,...}) ; //
no widgets
var req = new qx.io.remote.Request(url+parStr,"GET","text/plain");
I solved it
var parStr=myNameSpace.myToUriParameter({par1: 1,par2: 55,...}) ; // no
widgets
var req = new qx.io.remote.Request(url+parStr,"GET","text/plain");
/* ok I could do it manualy new
qx.io.remote.Request(url+"?par1=1&par2=55...","GET","text/plain"); */
myToUriParameter: function(oObj)
{ /*only simple properties (no arrays and objs)
?par1=val1&par2=val2... */
var i=0,result = "";
for (var key in oObj)
{
result+=(i==0 ? "?" : "&") + key +'='+oObj[key];
i++;
}
return result;
}
Regards
FranĨek
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/qx-util-Serializer-toUriParameter-not-working-tp7439333p7440643.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel