Home > Tag Archives: json

Tag Archives: json

Invalid JSON if integer value starts with 0


If any integer value in the JSON starts with 0, the parser will throw an error as “invalid key:value pair” or “SyntaxError: Unexpected number in JSON at position xx” . The reason of this error is because if the integer begins with leading 0 then it will consider this value as Octal number. As Octal number always starts with 0 ... Read More »

How to handle jQuery cross domain AJAX request

Cross Domain jQuery AJAX request AJAX Requests are only possible if port, protocol and domain of sender and receiver are equal, means that the following below listed requests won’t work- Requesting https://serverA.com/a.php from http://serverA.com/b.php Requesting http://subdomain.serverA.com from http://serverA.com Requesting http://serverA.com:5000 from http://serverA.com Here in this tutorial we will cover the ways to handle this restriction. First lets look at the ... Read More »