{"id":22374864,"url":"https://github.com/qubitproducts/json-bourne","last_synced_at":"2025-10-03T23:25:14.998Z","repository":{"id":26781679,"uuid":"30239862","full_name":"QubitProducts/json-bourne","owner":"QubitProducts","description":"Drop in replacement for JSON that standardizes Array.toJSON and Date.toJSON","archived":false,"fork":false,"pushed_at":"2021-02-10T16:29:40.000Z","size":52,"stargazers_count":15,"open_issues_count":2,"forks_count":0,"subscribers_count":28,"default_branch":"master","last_synced_at":"2024-11-14T10:33:28.932Z","etag":null,"topics":["ceh","implement"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QubitProducts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-03T11:38:08.000Z","updated_at":"2023-06-02T12:06:58.000Z","dependencies_parsed_at":"2022-07-30T19:18:03.402Z","dependency_job_id":null,"html_url":"https://github.com/QubitProducts/json-bourne","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Fjson-bourne","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Fjson-bourne/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Fjson-bourne/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QubitProducts%2Fjson-bourne/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QubitProducts","download_url":"https://codeload.github.com/QubitProducts/json-bourne/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228192274,"owners_count":17882763,"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","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":["ceh","implement"],"created_at":"2024-12-04T21:18:48.519Z","updated_at":"2025-10-03T23:25:09.958Z","avatar_url":"https://github.com/QubitProducts.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![json-bourne](https://cloud.githubusercontent.com/assets/823104/6025028/5493ca12-abc7-11e4-9431-43a851bcb08b.jpg)\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\n[ ![Codeship Status for qubitproducts/json-bourne](https://codeship.com/projects/0d7fcc80-dc51-0132-9f1d-025863fcc952/status?branch=master)](https://codeship.com/projects/79926)\n\nNormalizes the JavaScript JSON API against overwritten `Array.prototype.toJSON` and IE8's unstandardized version of `Date.prototype.toJSON`.\n\nAdvantages over [JSON 3](https://github.com/bestiejs/json3)\n- Much smaller, only a few lines rather than 4KB\n- Uses native stringify and parse methods\n- Runs much quicker on older browsers\n\nKnown issues\n- Does not protect against all monkeypatching\n- Can be slower at stringifying on newer browsers (see [Benchmarks](#benchmarks))\n- Not compatible with IE7 or below\n\nInstallation\n============\n```bash\n$ npm install --save json-bourne\n```\n\nMotivation\n==========\nJSON Bourne is intended for use in code that you'll execute on websites you don't control. Such websites can break the native `JSON.stringify` implementation by changing `Array.prototype.toJSON`, specifically if they use prototype.js version 1.6 or under. JSON Bourne also normalizes `Date.prototype.toJSON`, correcting the unstandard implementation for IE8. Any changes to prototypes are restored immediately after stringifying.\n\nUsage\n=====\n\nJSON Bourne is a drop in replacement for JSON, replicating the standard `parse` and `stringify` methods exactly.\n\n```javascript\nvar JSON = require('json-bourne')\n\nconsole.log(JSON.parse('{\"bourne\": \"legacy\"}'))\n// Logs { bourne: \"legacy\" }\n\nconsole.log(JSON.stringify({\"bourne\": \"ultimatum\"}))\n// Logs { \"bourne\": \"ultimatum\" }\n```\n\nCompatibility\n=============\nTested on IE8+, Chrome, Firefox, Opera and Safari.\n\nBenchmarks\n==========\n- [Stringify](http://jsperf.com/json-bourne-stringify)\n- [Parse](http://jsperf.com/json-bourne-parse)\n\nWant to work on this for your day job?\n======================================\n\nThis project was created by the Engineering team at [Qubit](http://www.qubit.com). As we use open source libraries, we make our projects public where possible.\n\nWe’re currently looking to grow our team, so if you’re a JavaScript engineer and keen on ES2016 React+Redux applications and Node micro services, why not get in touch? Work with like minded engineers in an environment that has fantastic perks, including an annual ski trip, yoga, a competitive foosball league, and copious amounts of yogurt.\n\nFind more details on our [Engineering site](https://eng.qubit.com). Don’t have an up to date CV? Just link us your Github profile! Better yet, send us a pull request that improves this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqubitproducts%2Fjson-bourne","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqubitproducts%2Fjson-bourne","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqubitproducts%2Fjson-bourne/lists"}