{"id":19649991,"url":"https://github.com/jessealama/ejs","last_synced_at":"2025-07-09T23:07:09.343Z","repository":{"id":62424110,"uuid":"141965898","full_name":"jessealama/ejs","owner":"jessealama","description":"Exact JSON library for Racket","archived":false,"fork":false,"pushed_at":"2024-08-28T13:41:31.000Z","size":30,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T09:34:16.676Z","etag":null,"topics":["json","racket"],"latest_commit_sha":null,"homepage":null,"language":"Racket","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jessealama.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","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":"2018-07-23T05:34:08.000Z","updated_at":"2024-08-28T13:41:34.000Z","dependencies_parsed_at":"2024-08-28T15:12:35.139Z","dependency_job_id":null,"html_url":"https://github.com/jessealama/ejs","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessealama%2Fejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessealama%2Fejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessealama%2Fejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessealama%2Fejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jessealama","download_url":"https://codeload.github.com/jessealama/ejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251345795,"owners_count":21574780,"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":["json","racket"],"created_at":"2024-11-11T14:56:10.991Z","updated_at":"2025-04-28T16:30:43.223Z","avatar_url":"https://github.com/jessealama.png","language":"Racket","funding_links":[],"categories":[],"sub_categories":[],"readme":"EJS: Exact JSON for Racket\n==========\n\nEJS is an *exact JSON* library for Racket. It is a no-compromises—no numeric rounding—implementation of JSON for Racket.\n\nEJS does essentially the same thing that Racket's standard JSON library, `json`, does. The main difference is that EJS's concept of numbers is *exact*: every number that EJS handles is an exact (read, rational) number. Given a a number like\n\n    1.00000000000000000000000000001\n\nEJS will handle this like the respectable rational number it is. Internally, such a thing will get handled as the lovely rational number\n\n    1000000000000000000000000000001/1000000000000000000000000000000\n\nrather than bowing in the face of practicality and using\n\n    1.0\n\nIt's all about numbers. EJS has nothing special to say about the non-numeric parts of JSON. They are handled just like the `json` package. (At least, they *ought* to be handled that way. If that's not the case, please let me know.)\n\n# What's the difference between EJS and Racket's built-in JSON support? #\n\nEJS is intended to be *just like Racket's built-in JSON library* with one exception: all numbers are exact.\n\nIn the EJS world, all numbers are rational (hence exact). In Racket's JSON world, inexact numbers are allowed.\n\nThis one difference—the insistence that all numbers are rational—shows up in three places:\n\n## jsexpr? vs. ejsexpr? ##\n\nLet's keep it short and sweet:\n\n    \u003e (jsexpr? #e3/5)\n\t#f\n\nwhereas\n\n    \u003e (ejsexpr? #e3/5)\n\t#t\n\n## Parsing (bytes-\u003ejsexpr \u0026 string-\u003ejsexpr) ##\n\nGiven the difference above between `jsexpr?` and `ejsexpr?`, it is understandable that there would be a difference in parsing JSON. Thus:\n\n    (string-\u003ejsexpr \"1.0000000000000000000000000000000001\")\n\t1.0\n\nCompare:\n\n    (string-\u003eejsexpr \"1.0000000000000000000000000000000001\")\n\t10000000000000000000000000000000001/10000000000000000000000000000000000\n\nEJS does not deal with a wider range of JSON inputs. Thus, since rational numbers are not part of the syntax of JSON, EJS rejects them. It takes a harsher stance on such inputs.\n\n    (string-\u003ejsexpr \"3/5\")\n\t3\n\nVersus\n\n    (string-\u003eejsexpr \"3/5\")\n\terror!\n\n## Rendering (jsexpr-\u003ebytes \u0026 jsexpr-\u003estring) ##\n\nEJS does not extend the official language of JSON. Thus, when rendering an ejsexpr? value, you get valid JSON.\n\nIn fact, you should find that `ejsexpr-\u003estring` and `string-\u003eejsexpr` are inverses of each other: for all JSON-parseable strings `X`,\n\n    (ejsexpr-\u003estring (string-\u003eejsexpr X)) = X\n\nholds, and, for all EJS expressions `E`,\n\n    (string-\u003eejsexpr (ejsexpr-\u003estring E)) = E\n\nSuch roundtripping is not guaranteed by Racket's built-in JSON package because it lowers the precision of some \"high-precision\" numbers.\n\n## License ##\n\nEJS is offered under the terms of the ISC License (as tweaked by OpenBSD; see the [template](https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/share/misc/license.template?rev=HEAD)). See the file `LICENSE`.\n\n— [Jesse Alama](mailto:jesse@lisp.sh \"get in touch\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessealama%2Fejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjessealama%2Fejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessealama%2Fejs/lists"}