Cannot post Json array to web core api
Try setting the processData
property of the ajax call to false, like this:
$.ajax({ url: url, type: "POST", contentType: "application/json", dataType: "json", data: { "": properties }, processData: false })
According to the docs:
By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false.
Alternatively, just set the data
property to your stringified json:
$.ajax({ url: url, type: "POST", contentType: "application/json", dataType: "json", data: properties })