# get-json-data

> Make ajax request to get the json data.

Latest version **0.1.2** (published 2016-02-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-json-data
pnpm add get-json-data
yarn add get-json-data
bun add get-json-data
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2016-02-22 |
| First published | 2014-12-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Gagan Bansal |
| Maintainers | gagan-bansal |
| Keywords | ajax, json |

## Links

- npm: https://www.npmjs.com/package/get-json-data
- Repository: https://github.com/gagan-bansal/get-json-data
- Issues: https://github.com/gagan-bansal/get-json-data/issues
- npm.io page: https://npm.io/package/get-json-data

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.1.2 (latest) — 2016-02-22
- 0.1.1 — 2016-02-21
- 0.1.0 — 2015-12-06
- 0.0.6 — 2015-02-23
- 0.0.5 — 2015-01-08
- 0.0.4 — 2015-01-08
- 0.0.3 — 2014-12-30
- 0.0.2 — 2014-12-30
- 0.0.1 — 2014-12-30
- 0.0.0 — 2014-12-24

## README

# get-json-data
Make ajax request to get the json data from browser. Not for nodejs, use [request](https://www.npmjs.com/package/request) module instead. 


## usage
can not be more simpler:

include ```index.js``` in your html.

```javascript
getJSONData(url,callback);
//callback function 
fucntion callback(err, data) {
  if (err) {
    console.log('request failed');
    return;
  }
  // do something with data
}
```
### note
This module does not support jsonp. For jsonp request you may use [jsonp](https://www.npmjs.com/package/jsonp) module.
### similar
Here is list of other popular and stable projects
* [superagent](https://github.com/visionmedia/superagent)
* [axios](https://github.com/mzabriskie/axios)
* [qwest](https://github.com/pyrsmk/qwest)
* [A Comparison of JavaScript HTTP Libraries for the Browser](http://www.sitepoint.com/comparison-javascript-http-libraries/)
* [when](https://github.com/cujojs/when)
* [promise](https://github.com/then/promise)
* [async](https://github.com/caolan/async)
* [Loading JSON-formatted data with Ajax and xhr.responseType='json'](https://mathiasbynens.be/notes/xhr-responsetype-json#comments)
* [Cross-Origin Resource Sharing (CORS) AJAX Requests Between jQuery And Node.js](http://www.bennadel.com/blog/2327-cross-origin-resource-sharing-cors-ajax-requests-between-jquery-and-node-js.htm)

##License
This project is licensed under the terms of the MIT license.

---
_Source: https://npm.io/package/get-json-data · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
