I am trying to send JSON from my mozilla addon to my asp.net page.
var myJSONObject = {"userName": una,"password": pass};
request = new XMLHttpRequest();
request.open("GET","http://www.google.com?jo=" + myJSONObject,true, null, null);
on my .net page I have tried several ways of doing it but not able to find the best way to serialize and deserialize the code.
All I need is to send the json data back n forth and parse it on C# n javascript.
I have tried DataContractJsonSerializer, JavaScriptSerilizer among many other things. But not able to make any of it work.
With the JavaScriptSerilizer, It does deserilize it if it takes an argument from the browser for e.g. If I open up the browser and paste something like http://www.google.com?jo={"Username":"hna123","Password":"2444"}
it does deserilize and return me individual values, but it does work when I do an XMLHTTPRequest (as above) from my mozilla addon. Any clues?