{"id":22502354,"url":"https://github.com/rickyli79/rich-json","last_synced_at":"2025-03-27T22:45:33.069Z","repository":{"id":225167601,"uuid":"765251584","full_name":"RickyLi79/rich-json","owner":"RickyLi79","description":"serialize and deserialize rich javascript data types, suport reference data.","archived":false,"fork":false,"pushed_at":"2024-03-22T18:05:16.000Z","size":722,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T03:23:41.177Z","etag":null,"topics":["circular-reference","clone","json","rich-type"],"latest_commit_sha":null,"homepage":"https://rickyli79.github.io/rich-json/","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/RickyLi79.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-29T15:08:42.000Z","updated_at":"2024-02-29T16:46:46.000Z","dependencies_parsed_at":"2024-03-05T17:52:07.292Z","dependency_job_id":null,"html_url":"https://github.com/RickyLi79/rich-json","commit_stats":null,"previous_names":["rickyli79/rich-json"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickyLi79%2Frich-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickyLi79%2Frich-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickyLi79%2Frich-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RickyLi79%2Frich-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RickyLi79","download_url":"https://codeload.github.com/RickyLi79/rich-json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245937930,"owners_count":20696988,"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":["circular-reference","clone","json","rich-type"],"created_at":"2024-12-06T23:17:26.848Z","updated_at":"2025-03-27T22:45:33.021Z","avatar_url":"https://github.com/RickyLi79.png","language":"TypeScript","readme":"# @rickyli79/rich-json\nserialize and deserialize rich javascript data types, suport reference data.\n\n## install\n```\nnpm install @rickyli79/rich-json\n```\n\n## usage\n\n### supported runtime\n- NodeJS\n- Browser\n\n### stringify\n```typescript\nimport RichJson from '@rickyli79/rich-json'\n// const RichJson = require('@rickyli79/rich-json');\nconst complexObj_origin = { key: 'any supported data types' };\nconst rJson:string = RichJson.stringify(complexObj_origin);\n// todo: save rJson to file;\n```\n### parse\n```typescript\nimport RichJson from '@rickyli79/rich-json'\nconst rJson:string = getRichJsonText();\nconst complexObj = RichJson.parse\u003cTComplaxObj\u003e(rJson);\n```\n\n### clone\n```typescript\nimport RichJson from '@rickyli79/rich-json'\nconst complexObj_origin = { key: 'any supported data types' };\nconst complexObj = RichJson.clone(complexObj_origin);\n\nassert.notStrictEqual(complexObj, complexObj_origin);\n```\n\n## supported data types\n- primitive\n  - null\n  - undefined\n  - bigint\n  - number\n    - normal\n    - `NaN`\n    - `-0`\n    - `Number.EPSILON`\n    - `Number.MAX_SAFE_INTEGER`\n    - `Number.MIN_SAFE_INTEGER`\n    - `Number.NEGATIVE_INFINITY`\n    - `Number.POSITIVE_INFINITY`\n- function\n  - function\n  - async function\n  - arrow function\n  - async arrow function\n- object\n  - `URL`\n  - `Date`\n  - `RegExp`\n  - `Set`\n  - `Map`\n  - `Error` ( with `message` only, ~~without `stack`~~ )\n  - Buffer like\n    - `Buffer` ***in NodeJs***\n    - `Int8Arrany`, `Uint16Array`, `Uint32Array` ...and more\n    - ~~NOT support `Blob`~~\n  - `WrapRunner` class\n  - customer serializers\n- reference\n  - reference to same object\n  - circular reference\n  \u003e including reference in `Set` and `Map`, and `WrapRunner` class or `customer serializers`\n\n## unittest \n- Report: https://rickyli79.github.io/rich-json/\n- [unittest files](https://github.com/RickyLi79/rich-json/tree/main/test)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickyli79%2Frich-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frickyli79%2Frich-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickyli79%2Frich-json/lists"}