If I've understood your query correctly, you're seeking a way to send requests to the server and retrieve data in JSON format without relying on jQuery or any other libraries.
Let's travel back in time to the year 2000 before 'prototype', 'jQuery', and similar frameworks came into existence, when the term 'Ajax' hadn't even been coined (although the concept was already being used).
- XmlHttpRequest - An object that facilitates sending asynchronous HTTP requests and receiving responses. Originally designed for XML content by the creators of Microsoft Outlook Web Access, it now supports various MIME types, including JSON. Initially an ActiveX available only in IE, it is now a sub-object of the 'window' top-level object and is supported by all browsers. Both jQuery and most libraries utilize this object for Ajax functionality. For more information and examples, visit: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest
- XmlHttpRequest only allows requests to be made to the same domain as the page. To work around this limitation, a technique called JSON-P was introduced. By creating a `script` element with its source pointing to another domain, server-generated scripts can pass data as an argument to a callback function implemented in your page. The name of the function becomes part of the URL, like so:
<script type="text/javascript"
src="http://blogname.blogspot.com/feeds/posts/default?alt=json-in-script&callback=myFunc"
></script>
Take a look at this example URL (which fetches recent posts from Google's blogpost). Notice how everything is encapsulated within a call to the function `myFunc`, passed as a callback.
You can either embed the `script` element directly into your code, generate it dynamically using `document.write`, or use DOM manipulation to add a `SCRIPT` element to the document.