It might not be that relevant, but the answer in short is No and Yes. If you're using the data attribute of jquery. It will actually transform your object into fields. Something like that:
{
friend: [1,2,3]
}
May be sent as such to the server:
friend[0]=1&friend[1]=2&friend[2]=3
That said, HTTP doesn't actually define any "right" way to send data to the server. jQuery does that to make it works as if the client posted a form. So it is serializing data like formdata.
But that's not all! Since you can send data as you like. You can do something different. I'm not sure it is possible to send raw data with jQuery.
You might want to try that:
$.ajax({
url: ...,
data: myObject.toJSON(),
...
})
Since you're sending a string without any defined fields. You'll have to check on the server for the raw data. Convert the JSON
string to a dict and you're good to go.
To make sending json to your server, there is a fabulous thing called, jsonrpc.
http://www.jsonrpc.org/
Unfortunately my knowledge of bottle.py
is close to 0 so I can't really help much on how to get data.
tldr
Send json to the server and then parse it back to a dict, you could send anything else as long as you know how to parse it back on the other side. (xml, json, messagepack...)