Trying to get JQuery to post JSON to a server:
$.ajax({ url: \"/path/to/url\", type: \"POST\", dataType: \"json\", contentType: \"json\",
You could use json2.js:
data: JSON.stringify({"foo": "bar"})