Prototype.js->toJson causing problem
I am injecting some Java script in to a page. The order in which my scripts are being injected is as follows [immediately after <head>. Other scripts that existing page requires are after this]:
I need help with two things here :
- In my ChatScript.js ,I am using "ah" instead of "$". Do i need to move var ah = jQuery.noConflict( true ); immediately after jQuery-2.1.3.js and modify signalR-2.0.0.js and dynamically generated hub proxy to use "ah" instead of "$" in order to make sure my version of jQuery i.e. 2.1.3 does not interfere with the one already used by page. In simple words , i want JavaScript on target page to be unaware of my jQuery version and vice versa .
- The data that is passed to my server should be [{"name":"chathub"}] . However , when " connection.json.stringify(message); " is called in signalR , toJson extension of prototype.js triggers and changes my message to [{\"name\":"chathub\"}] . As a result of this , i get Newtonsoft.Json.JsonSerializationException on server side.
Please help.
Regards,
Nish26