I am creating a JSON object dynamically and when I send it via an ajax POST I get Disallowed Key Characters as the response. I know that my object is ok because I can create the SAME EXACT object manually and it sends fine. I tried escape()
on all of my strings before adding them to the obj but that did not work either.
Am I missing something?
This is my post
$.ajax({
type: 'POST',
url: 'http://localhost/test',
data: obj,
dataType : 'JSON',
success: function(){
console.log('nice');
}
});
I am using the same obj as in this post
http://stackoverflow.com/questions/3580260/add-to-json-without-knowing-its-structure