{"id":15041219,"url":"https://github.com/probablyarth/jason","last_synced_at":"2026-02-16T20:06:40.450Z","repository":{"id":70292390,"uuid":"604492484","full_name":"probablyArth/jason","owner":"probablyArth","description":"A simple typesafe JSON ORM library that allows you to interact with data stored in a JSON database","archived":false,"fork":false,"pushed_at":"2024-04-07T08:43:49.000Z","size":89,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T14:44:59.696Z","etag":null,"topics":["javascript","javascript-library","json","json-db","json-orm","orm","orm-library","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@probablyarth/jason","language":"TypeScript","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/probablyArth.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-21T07:07:48.000Z","updated_at":"2023-09-26T07:20:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3531d51-dacc-458a-b3e5-d9bd4cb94215","html_url":"https://github.com/probablyArth/jason","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"b6b508e77dfe798f568e4c539685ad43aa8b2751"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probablyArth%2Fjason","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probablyArth%2Fjason/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probablyArth%2Fjason/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probablyArth%2Fjason/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/probablyArth","download_url":"https://codeload.github.com/probablyArth/jason/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245822290,"owners_count":20678164,"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":["javascript","javascript-library","json","json-db","json-orm","orm","orm-library","typescript","typescript-library"],"created_at":"2024-09-24T20:45:46.442Z","updated_at":"2025-10-12T10:13:58.514Z","avatar_url":"https://github.com/probablyArth.png","language":"TypeScript","readme":"# Jason\n\nA simple typesafe JSON ORM library that allows you to interact with data stored in a JSON database. The library provides a simple ORM-like interface for working with data.\n\n## Installation\n\n- npm\n\n```bash\nnpm install @probablyarth/jason\n```\n\n- yarn\n\n```bash\nyarn add @probablyarth/jason\n```\n\n## Usage\n\nHere is an example of how to use the library\n\n```typescript\nimport { Init, Model } from \"@probablyarth/jason\";\n\nInit(\"path/to/database.json\");\n\ninterface IUser {\n  name: string;\n  age: number;\n}\n\nconst userModel = new Model\u003cIUser\u003e(\"users\");\n\nconst userId = userModel.insertOne({\n  name: \"probablyarth\",\n  age: 17,\n});\n\nconst user = userModel.findById(userId);\n\nconsole.log(user);\n```\n\nYou can also use it without types,\n\n```javascript\nimport { Init, Model } from \"@probablyarth/jason\";\n\nInit(\"path/to/database.json\");\n\nconst userModel = new Model(\"users\");\n\nconst userId = userModel.insertOne({\n  name: \"probablyarth\",\n  age: 17,\n});\n\nconst user = userModel.findById(userId);\n\nconsole.log(user);\n```\n\nMore examples in the [examples folder](https://github.com/probablyArth/jason/blob/main/examples.ts)\n\n## Disclaimer\n\nJson files should not be used as database for projects that store huge amounts of data. Although a json file of 1mb should be able to hold about 5-10k records (depends on the size of records).\nAll the data is loaded in the memory temporarily but this shouldn't be any problem either when working with small projects or projects that require DB to be hosted locally.\n\n## Motivation\n\nI was working on a side project which needed a database to be hosted locally by the user. It would be a very big hassle for the end user if he had to setup mongodb or mysql on his pc to use that project and the data won't be that much either so there was no point in setting up a traditional dbms. I wanted a lighter and simpler solution, that's when I thought about json files.\n\n\u003ca href=\"https://www.buymeacoffee.com/probablyarth\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\n\n## TODO\n\n- Better Queries, perhaps a queryBuilder?\n- Docs? Maybe\n","funding_links":["https://www.buymeacoffee.com/probablyarth"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobablyarth%2Fjason","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprobablyarth%2Fjason","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobablyarth%2Fjason/lists"}