I'm trying to pass JavaScript object to C# WCF service as Dictionary and I don't know how to do it...
I have a WCF service:
[OperationContract]
[WebInvoke]
public List<psy_trance_fm_genre> select(SortedDictionary<string, object> parameters)
{
...
}
And I have some JavaScript / JQuery code:
$.ajax({
contentType: 'application/json; charset=utf-8',
data: JSON.stringify({ '@genre': '', '@start_row_index': 0, '@maximum_rows': 100 }),
error: function (jqXHR, textStatus, errorThrown) {
...
},
success: function (data, textStatus, jqXHR) {
...
},
type: 'POST',
url: 'svc/psy_trance_fm_genres.svc/select'
});
Please help me to make them work together! Thanks in advance!