I keep getting this error in JavaScript when trying to pass some JSON to a UIWebView:
SyntaxError: Unexpected EOF
There is no line number or filename available in window.onerror but I've already checked all referenced files, and they are fine.
I'm using MonoTouch EvaluateJavaScript method which is equivalent to ObjC stringByEvaluatingJavaScriptFromString::
webView.EvaluateJavascript( "Viewer.init($('#page'), " + json.ToString() + ");" ); It works just fine on “simple” JSON input but breaks at larger objects.
What could go wrong?