{"id":13688536,"url":"https://github.com/VienDinhCom/jsonfile","last_synced_at":"2025-05-01T19:31:05.530Z","repository":{"id":62421724,"uuid":"301166642","full_name":"VienDinhCom/jsonfile","owner":"VienDinhCom","description":"📚 Easily read/write JSON files in Deno","archived":false,"fork":false,"pushed_at":"2021-08-06T23:30:33.000Z","size":19,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T02:22:21.420Z","etag":null,"topics":["deno","json","jsonfile","read-json","read-json-sync","write-json","write-json-sync"],"latest_commit_sha":null,"homepage":"https://deno.land/x/jsonfile","language":"TypeScript","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/VienDinhCom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-04T15:51:05.000Z","updated_at":"2024-03-19T03:59:14.000Z","dependencies_parsed_at":"2022-11-01T17:32:01.235Z","dependency_job_id":null,"html_url":"https://github.com/VienDinhCom/jsonfile","commit_stats":null,"previous_names":["maxvien/jsonfile"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VienDinhCom%2Fjsonfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VienDinhCom%2Fjsonfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VienDinhCom%2Fjsonfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VienDinhCom%2Fjsonfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VienDinhCom","download_url":"https://codeload.github.com/VienDinhCom/jsonfile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251932649,"owners_count":21667188,"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":["deno","json","jsonfile","read-json","read-json-sync","write-json","write-json-sync"],"created_at":"2024-08-02T15:01:16.130Z","updated_at":"2025-05-01T19:31:05.186Z","avatar_url":"https://github.com/VienDinhCom.png","language":"TypeScript","funding_links":[],"categories":["deno"],"sub_categories":[],"readme":"# jsonfile\n\nEasily read/write JSON files in Deno\n\n## readJson\n\nReads a JSON file and then parses it into an object\n\n```ts\nimport { readJson, readJsonSync } from \"https://deno.land/x/jsonfile/mod.ts\";\n\nconst f = await readJson(\"./foo.json\");\nconst foo = readJsonSync(\"./foo.json\");\n```\n\n## writeJson\n\nWrites an object to a JSON file.\n\n### WriteJsonOptions\n\n- replacer : An array of strings and numbers that acts as a approved list for\n  selecting the object properties that will be stringified.\n- space : Adds indentation, white space, and line break characters to the\n  return-value JSON text to make it easier to read.\n\nYou can also specify options from `Deno.WriteFileOptions` to configure how the\nfile is written.\n\n```ts\nimport { writeJson, writeJsonSync } from \"https://deno.land/x/jsonfile/mod.ts\";\n\nwriteJson(\"./target.json\", { foo: \"bar\" }, { spaces: 2 }); // returns a promise\nwriteJsonSync(\"./target.json\", { foo: \"bar\" }, { replacer: [\"foo\"] }); // void\n\n// appends to the file instead of rewriting\nwriteJsonSync(\"./target.json\", { foo: \"bar\" }, { append: true });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVienDinhCom%2Fjsonfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVienDinhCom%2Fjsonfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVienDinhCom%2Fjsonfile/lists"}