{"id":31756728,"url":"https://github.com/ebay/jsonpipe","last_synced_at":"2025-10-09T19:22:49.959Z","repository":{"id":26757018,"uuid":"30214879","full_name":"eBay/jsonpipe","owner":"eBay","description":"A lightweight AJAX client for chunked JSON responses","archived":false,"fork":false,"pushed_at":"2023-05-09T21:39:34.000Z","size":206,"stargazers_count":207,"open_issues_count":4,"forks_count":42,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-10-01T20:55:14.352Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://ebay.github.io/jsonpipe/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eBay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-02T23:40:19.000Z","updated_at":"2024-04-20T05:59:24.000Z","dependencies_parsed_at":"2024-06-18T16:48:04.787Z","dependency_job_id":"79b35ef5-0c81-4212-9bd2-f0e505843766","html_url":"https://github.com/eBay/jsonpipe","commit_stats":{"total_commits":68,"total_committers":11,"mean_commits":6.181818181818182,"dds":0.1470588235294118,"last_synced_commit":"2811a32db0bef03381a6e6fed41eace623e1e5ac"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eBay/jsonpipe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2Fjsonpipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2Fjsonpipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2Fjsonpipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2Fjsonpipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eBay","download_url":"https://codeload.github.com/eBay/jsonpipe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2Fjsonpipe/sbom","scorecard":{"id":363193,"data":{"date":"2025-08-11","repo":{"name":"github.com/eBay/jsonpipe","commit":"2811a32db0bef03381a6e6fed41eace623e1e5ac"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":2,"reason":"Found 7/29 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/eBay/.github/SECURITY.md:1","Info: Found linked content: github.com/eBay/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/eBay/.github/SECURITY.md:1","Info: Found text in security policy: github.com/eBay/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T11:16:48.414Z","repository_id":26757018,"created_at":"2025-08-18T11:16:48.414Z","updated_at":"2025-08-18T11:16:48.414Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001978,"owners_count":26083243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T19:22:48.649Z","updated_at":"2025-10-09T19:22:49.953Z","avatar_url":"https://github.com/eBay.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsonpipe [![Build Status](https://travis-ci.org/eBay/jsonpipe.svg?branch=master)](https://travis-ci.org/eBay/jsonpipe) [![Coverage Status](https://coveralls.io/repos/eBay/jsonpipe/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/eBay/jsonpipe?branch=master) [![npm version](https://badge.fury.io/js/jsonpipe.svg)](http://badge.fury.io/js/jsonpipe) [![Dependency Status](https://david-dm.org/ebay/jsonpipe.svg)](https://david-dm.org/ebay/jsonpipe)\n\njsonpipe is a lightweight AJAX client for chunked JSON responses. The API is similar to [jQuery ajax](http://api.jquery.com/jquery.ajax/), but for JSON responses transmitted through [chunked encoding](http://en.wikipedia.org/wiki/Chunked_transfer_encoding). It is a standalone utility with no dependencies. \n\n## Browser Support\nIE8 and above. All versions of Chrome, Safari, Firefox, Opera and Android browsers.\n\n## Prerequisites\nTo use jsonpipe, the server should \n\n1. Emit the [Transfer-Encoding: chunked](http://en.wikipedia.org/wiki/Chunked_transfer_encoding) HTTP header (only if HTTP/1.* is used)\n2. Every valid JSON object should be separated by the delimiter `\\n\\n` (double new line character, it is also  [configurable](https://github.com/eBay/jsonpipe#delimiter)). Instead of processing the JSON on every chunk, jsonpipe waits for the delimiter and then processes. The server should always ensure there is a valid JSON object between the delimiter. The reasoning behind this is, even when a chunk has an invalid JSON (which is very likely), the JSON processing would not break and wait for the next delimiter. A sample JSON response shown below \n```JSON\n    {\n        \"id\": 12345,\n        \"title\": \"Bruce Wayne\",\n        \"price\": \"$199.99\"\n    }\n    \\n\\n\n    {\n        \"id\": 67890,\n        \"title\": \"Bane\",\n        \"price\": \"$299.99\"\n    }\n```\n\n## Usage\n[jsonpipe.js](https://github.com/eBay/jsonpipe/blob/master/jsonpipe.js) is bundled as a [browserify CommonJS](http://dontkry.com/posts/code/browserify-and-the-universal-module-definition.html) module, so it can be used in the same node.js `require` style. It has only one API named `flow` exposed \n```HTML\n    \u003cscript src=\"jsonpipe.js\"\u003e\u003c/script\u003e\n```\n```JavaScript\n    var jsonpipe = require('jsonpipe');\n\t/**\n     * @param {String} url A string containing the URL to which the request is sent.\n     * @param {Object} url A set of key/value pairs that configure the Ajax request.\n     * @return {XMLHttpRequest} The XMLHttpRequest object for this request.\n     * @method flow\n     */\n    jsonpipe.flow('http://api.com/items?q=batman', {\n    \t\"delimiter\": \"\", // String. The delimiter separating valid JSON objects; default is \"\\n\\n\"\n      \"onUploadProgress\": function(progressEvent) {\n          // Do something with browser's upload progress event\n      },\n      \"onHeaders\": function(statusText, headers) {\n          // Do something with the headers and the statusText.\n      },\n      \"success\": function(data) {\n          // Do something with this JSON chunk\n      },\n      \"error\": function(errorMsg) {\n          // Something wrong happened, check the error message\n      },\n      \"complete\": function(statusText) {\n          // Called after success/error, with the XHR status text\n      },\n      \"timeout\": 3000, // Number. Set a timeout (in milliseconds) for the request\n      \"method\": \"GET\", // String. The type of request to make (e.g. \"POST\", \"GET\", \"PUT\"); default is \"GET\"\n      \"headers\": { // Object. An object of additional header key/value pairs to send along with request\n          \"X-Requested-With\": \"XMLHttpRequest\"\n      },\n      \"data\": \"\", // String | FormData | File | Blob. What to be sent in the request body.\n      \"disableContentType\": false, // By default jsonpipe will set `Content-Type` to \"application/x-www-form-urlencoded\", you can set `disableContentType` to `true` to skip this behavior. Must set `true` if your `data` is not a string.\n      \"withCredentials\": true // Boolean. Send cookies when making cross-origin requests; default is true\n    });\n```\n\n### options\n#### delimiter\nType: `String`\n\nThe delimiter separating valid JSON objects in the chunked response; default is `\\n\\n`\n\n### onUploadProgress\nType: `Function`\nThe callback function to be called when browser's native upload progress event triggered.\n\n#### onHeaders\nType: `Function`\n\nThe callback function to be called when headers are received. The function gets passed the the `XMLHttpRequest` object's  `statusText` and the headers.\n\n#### success\nType: `Function`\n\nThe callback function to be called on every valid JSON chunk. The function gets passed the parsed JSON object. \n\n#### error\nType: `Function`\n\nThe callback function to be called on error scenarios. The function gets passed with an error message, reasoning the failure. There can be many reasons for errors, the most common one being the JSON parse error. It that case the error message would be `parsererror`. For errors associated with the HTTP request the message would be `XMLHttpRequest` object's  `statusText`. \n\n#### complete\nType: `Function`\n\nThe callback function to be called when the request finishes (after success and error callbacks are executed). The function gets passed the `XMLHttpRequest` object's  `statusText`.\n\n#### timeout\nType: `Number`\n\nTimeout in milliseconds for the HTTP request. If a call exceeds the timeout, the call is aborted and error function is called.\n\n#### method\nType: `String`\n\nThe HTTP method/type of request to make (e.g. `POST`, `DELETE`, `PUT`); default is `GET`.\n\n#### headers\nType: `Object`\n\nAn object of additional header key/value pairs to send along with request.\n\n#### data\nType: `String` | `FormData` | `File` | `Blob`\n\nWhat to be sent in the request body. Please note if you would like to send anything rather than `String`, the option `disableContentType` must set to `true`.\n\n#### disableContentType\nType `Boolean`\n\nBy default jsonpipe will set `Content-Type` to \"application/x-www-form-urlencoded\", you can set `disableContentType` to `true` to skip this behavior. Must set `true` if your `data` is not a string.\n\n## Testing\nThe entire test suite for the jsonpipe API is available in the main test file  [jsonpipe.js](https://github.com/eBay/jsonpipe/blob/master/test/jsonpipe.js). The [mocha-phantomjs](https://github.com/metaskills/mocha-phantomjs) wrapper is used as the testing framework and [chai](http://chaijs.com/api/assert/) for assertion. To run the tests - clone/fork the [repo](https://github.com/eBay/jsonpipe), \ninstall the package `$ npm install` and run\n\n    $ npm test\n\n## Issues\nHave a bug or a feature request? [Please open a new issue](https://github.com/eBay/jsonpipe/issues)\n\n## Author(s)\n[Senthil Padmanabhan](http://senthilp.com/)\n\n## License \nCopyright (c) 2015 eBay Inc.\n\nReleased under the MIT License\nhttp://www.opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febay%2Fjsonpipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febay%2Fjsonpipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febay%2Fjsonpipe/lists"}