WCF Service accepts simple JSON string but rejects JSON set with 400 error WCF Service accepts simple JSON string but rejects JSON set with 400 error sqlite sqlite

WCF Service accepts simple JSON string but rejects JSON set with 400 error


The JSON.stringify step is unnecessary because jQuery's AJAX engine does that automatically. Just pass in the result set array as the data property in the request options:

...data: resultSet,...

What you're doing now is stringifying an array to JSON, then asking jQuery to-restringify that resulting string as JSON before sending it to the server.