AJAX POST Method Call error : javax.jcr.nodetype.ConstraintViolationException
I have a high chart which displays JSON data. I want to export these JSON data to Excel file and that logic is there in JSP file. I can use the JQuery AJAX-GET call to pass the JSON data to JSP page and display these data in output Stream of excel type (response.setContentType("application/octet-stream")) which is working fine. My question is, Passing JSON data in URL is very lengthy and wants to Use the POST method Like below example(POST CALL CODE). When I use this example, I get exception as "javax.jcr.nodetype.ConstraintViolationException: No matching property definition: json = {"asset":"XLS","assetType":"Growth","fundName":"Growth portfolio"}" POST CALL CODE $.ajax({ url: url, type: 'POST', data: {json: JSON.stringify({ asset: "XLS", assetType: "Growth", fundName: "Growth portfolio" })}, dataType: 'json', success: function(msg){ alert("worked"); } });
Why do I need to define "json" property in CQ ? How do we resolve this issue ? Appreciate your help !