{"id":29101949,"url":"https://github.com/tyilo/json_with_nan","last_synced_at":"2025-06-28T21:08:57.966Z","repository":{"id":34450266,"uuid":"38385245","full_name":"tyilo/JSON_with_NaN","owner":"tyilo","description":"JSON with NaN (and Infinity/-Infinity)","archived":false,"fork":false,"pushed_at":"2015-07-01T18:43:06.000Z","size":100,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T03:16:50.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/tyilo.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-07-01T17:34:08.000Z","updated_at":"2024-04-24T03:16:50.415Z","dependencies_parsed_at":"2022-08-17T20:21:25.265Z","dependency_job_id":null,"html_url":"https://github.com/tyilo/JSON_with_NaN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tyilo/JSON_with_NaN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyilo%2FJSON_with_NaN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyilo%2FJSON_with_NaN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyilo%2FJSON_with_NaN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyilo%2FJSON_with_NaN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyilo","download_url":"https://codeload.github.com/tyilo/JSON_with_NaN/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyilo%2FJSON_with_NaN/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262497430,"owners_count":23320300,"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":[],"created_at":"2025-06-28T21:08:56.597Z","updated_at":"2025-06-28T21:08:57.959Z","avatar_url":"https://github.com/tyilo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"JSON with NaN (and Infinity/-Infinity)\n======================================\n\nEven though JSON is supported out of the box in modern browsers, none of them supports `NaN`, `Infinity` or `-Infinity` as values in JSON. This is because the JSON spec doesn't allow these values.\n\nHowever sometimes it is useful to be able to pass all Javascript numbers around, so this project solves the problem by providing the functions `JSON.stringifyWithNaN` and `JSON.parseWithNaN`.\n\nStrings created with `JSON.stringifyWithNaN` should be compatible with [Python's json module](https://docs.python.org/2/library/json.html) with `allow_nan=True` (which is the default).\n\nUsage\n-----\n\n```\nJSON.stringifyWithNaN(value[, replacer[, space]])\nJSON.parseWithNaN(text[, reviver])\n```\n\nSee the MDN article for [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) and [JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) for more information about the parameters.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyilo%2Fjson_with_nan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyilo%2Fjson_with_nan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyilo%2Fjson_with_nan/lists"}