My experience with JSON is limited, but I'm currently developing a web service that will receive JSON data from an iOS device and insert it into a database.
However, I've encountered an issue with the size of the image byte data which is causing a server-side error stating "An expression is too long or complex to compile."
Below is the JSON data and JavaScript AJAX call:
var source = {
"longitude": 96.84610000000001,
"latitude": 35.5608,
"username": "blah",
"imageDataBlob": "\/9j... (truncated for readability)"
}
$.ajax({
type: "POST",
dataType: "json",
url: "/api/blah/PostPicture/",
data: source
});
I need guidance on how to handle such large JSON objects passed to my web service. Are there any web.config settings I can adjust to accommodate this?