{"id":21616619,"url":"https://github.com/nesk/serialison","last_synced_at":"2026-04-27T18:32:27.008Z","repository":{"id":25152335,"uuid":"28574868","full_name":"nesk/serialison","owner":"nesk","description":"Resolve every link of a {json:api} document","archived":false,"fork":false,"pushed_at":"2015-03-22T21:55:05.000Z","size":316,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-15T22:14:04.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/nesk.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":"2014-12-29T00:16:39.000Z","updated_at":"2015-03-22T21:55:06.000Z","dependencies_parsed_at":"2022-08-23T02:30:23.662Z","dependency_job_id":null,"html_url":"https://github.com/nesk/serialison","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nesk/serialison","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesk%2Fserialison","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesk%2Fserialison/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesk%2Fserialison/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesk%2Fserialison/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nesk","download_url":"https://codeload.github.com/nesk/serialison/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nesk%2Fserialison/sbom","scorecard":{"id":100094,"data":{"date":"2022-08-15","repo":{"name":"github.com/nesk/serialison","commit":"252d0159b03866b4f24ef3061fc17ef58e9cd395"},"scorecard":{"version":"v4.5.0-26-g10b6052","commit":"10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93"},"score":4.8,"checks":[{"name":"Code-Review","score":0,"reason":"no reviews found","details":["Warn: no reviews found for commit: 252d0159b03866b4f24ef3061fc17ef58e9cd395","Warn: no reviews found for commit: c76aad43068e038ec89c76680203c970ee528a3e","Warn: no reviews found for commit: 7f0392085a37f8595892ef95da08affc4a0b22a0","Warn: no reviews found for commit: 2bf33fb488eb0ea46f3bc5d8ba21d45bfae9909a","Warn: no reviews found for commit: 3cd232015e37773cd40094a5a4a6953aaf9968b3","Warn: no reviews found for commit: 396531d5166aab6086344bfb17dc5ba2d542cef4","Warn: no reviews found for commit: 9e73b373958c8ccf03cdc802bab9b286b2de96bc","Warn: no reviews found for commit: a5d3791b53c5c56fcc35503cb95796cdbc918361","Warn: no reviews found for commit: ab03b2931e6e2e2fc924101f2a2bf75e99f2cd47","Warn: no reviews found for commit: 07e73a93aa53c0b28a0abb49724f0b193a307488","Warn: no reviews found for commit: 7b89fdfbd3c7c618b4d1bd12b1a303b344ac4bc7","Warn: no reviews found for commit: b7e9fd6005c9712692454fc347dde2717e40a97a","Warn: no reviews found for commit: 65780cc523140db3c44cd239fb0d62bb1284d73c","Warn: no reviews found for commit: 4d5fe8551b0ba0272b01459a6579954e5fa51cbe","Warn: no reviews found for commit: f0dddc3239c60c53f2b355a8500a37ca91a2e4f0","Warn: no reviews found for commit: edc5e5124fe757c52816e440a5741e4a7e9e5ac1","Warn: no reviews found for commit: c5101a023022f1623b0d15e0ac42bbc276ea0150","Warn: no reviews found for commit: 84009421f8babe54fc5a18a3f8c4b457c05a58e2","Warn: no reviews found for commit: 189ce2ad409a096c871e9cbeda383f92cdbc7863","Warn: no reviews found for commit: c935a7006c719cc6eae36ff3c2a3463dcf221312","Warn: no reviews found for commit: bba67d3ab773ec0e51a8d5384607311ae28e5202","Warn: no reviews found for commit: 23a56164de52c1eb982d94733d44f1833fea052f","Warn: no reviews found for commit: a6244db9b2566c4ffa7eac06eb9eb6237e248940","Warn: no reviews found for commit: ff8571496913ac7c0aa01c13d021f42cac68d687","Warn: no reviews found for commit: fe963a26004fd440091d029c8c1a6bd7bdb7e3a1"],"documentation":{"short":"Determines if the project requires code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) out of 25 and 0 issue activity out of 0 found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no badge detected","details":null,"documentation":{"short":"Determines if the project has a CII Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"no vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":["Warn: no GitHub releases found"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#branch-protection"}},{"name":"Token-Permissions","score":10,"reason":"tokens are read-only in GitHub workflows","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"no published package detected","details":["Warn: no GitHub publishing workflow detected"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#dangerous-workflow"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: : LICENCE:1"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info: GitHub-owned GitHubActions are pinned","Info: Third-party GitHubActions are pinned","Info: Dockerfile dependencies are pinned","Info: no insecure (not pinned by hash) dependency downloads found in Dockerfiles","Info: no insecure (not pinned by hash) dependency downloads found in shell scripts"],"documentation":{"short":"Determines if the project has declared and pinned its dependencies.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#binary-artifacts"}},{"name":"Dependency-Update-Tool","score":0,"reason":"no update tool detected","details":["Warn: dependabot config file not detected in source location.\n\t\t\tWe recommend setting this configuration in code so it can be easily verified by others.","Warn: renovatebot config file not detected in source location.\n\t\t\tWe recommend setting this configuration in code so it can be easily verified by others."],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#dependency-update-tool"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":null,"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":null,"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/10b6052acfb4f0b8136bc4876cb6f5b6f26bfe93/docs/checks.md#fuzzing"}}]},"last_synced_at":"2025-08-15T09:57:34.040Z","repository_id":25152335,"created_at":"2025-08-15T09:57:34.040Z","updated_at":"2025-08-15T09:57:34.040Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32349490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2024-11-24T22:14:52.870Z","updated_at":"2026-04-27T18:32:26.993Z","avatar_url":"https://github.com/nesk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SerialiSON\n\nResolve every link of a [{json:api}](http://jsonapi.org/) document\n\n## Installation\n\nNode.js:\n\n```shell\nnpm install --save serialison\n```\n\nBrowsers:\n\n```shell\nbower install --save serialison\n```\n\n## Usage\n\nRequire the constructor, instanciate it with your document and call the `resolve()` method:\n\n```js\n// The SerialiSON variable is already declared in a browser environment\nvar SerialiSON = require('serialison');\n\nvar myDocument = {\n    \"posts\": {\n        \"id\": \"1\",\n        \"title\": \"Rails is Omakase\",\n        \"links\": {\n            \"author\": {\n                \"id\": \"9\",\n                \"type\": \"people\"\n            },\n            \"comments\": [\"1\", \"2\", \"3\"]\n        }\n    },\n    \"linked\": {\n        \"people\": [{\n            \"id\": \"9\",\n            \"name\": \"@d2h\"\n        }],\n        \"comments\": [{\n            \"id\": \"1\",\n            \"body\": \"Mmmmmakase\"\n        }, {\n            \"id\": \"2\",\n            \"body\": \"I prefer unagi\"\n        }, {\n            \"id\": \"3\",\n            \"body\": \"What's Omakase?\"\n        }]\n    }\n};\n\nvar resolver = new SerialiSON(myDocument);\n\nvar resolvedDocument = resolver.resolve();\n```\n\nThe `resolvedDocument` variable will contain the following structure:\n\n```json\n{\n    \"posts\": {\n        \"id\": \"1\",\n        \"title\": \"Rails is Omakase\",\n        \"author\": {\n            \"id\": \"9\",\n            \"name\": \"@d2h\"\n        },\n        \"comments\": [{\n            \"id\": \"1\",\n            \"body\": \"Mmmmmakase\"\n        }, {\n            \"id\": \"2\",\n            \"body\": \"I prefer unagi\"\n        }, {\n            \"id\": \"3\",\n            \"body\": \"What's Omakase?\"\n        }]\n    }\n}\n\n```\n\n### Options\n\nYou can pass options to the constructor:\n\n```js\nnew SerialiSON(myDocument, {\n    // Options\n});\n```\n\nThe available options with their default values (syntax based on [JSDoc](http://usejsdoc.org/index.html)):\n\n```js\n{\n    /**\n     * Set to `false` to disable errors when the documents contain two resources\n     * with the same type and ID, the latest resource will override the other ones.\n     * @type {Boolean}\n     */\n    throwErrorsForDuplicateIDs: true,\n\n    /**\n     * Set to `false` to disable errors when the documents contain two URL templates\n     * with the same path, the latest URL template will override the other ones.\n     * @type {Boolean}\n     */\n    throwErrorsForDuplicateUrlTemplates: true,\n\n    /**\n     * Defines the maximum of nested resources the `resolve()` method will process.\n     * Raising this value may increase the resolving time, as memory usage.\n     * @type {Number}\n     */\n    maxNestingDepth: 4,\n\n    /**\n     * Lists the top level properties except the primary resource. Allows the\n     * constructor to find the name of your primary resource. Normally you shouldn't\n     * have to use this option but, if your document isn't {json:api} compliant and\n     * contains other top level properties, you can add them to this array.\n     * @type {string[]}\n     */\n    topLevelProperties: ['meta', 'links', 'linked'],\n\n    /**\n     * Strips the `links` and `linked` top level properties once the document is\n     * resolved.\n     * @type {Boolean}\n     */\n    stripTopLinkingProperties: true,\n\n    /**\n     * Strips the `links` property from each resource.\n     * @type {Boolean}\n     */\n    stripLinksProperty: true,\n\n\n    /**\n     * A custom transformer to alter an object\n     * @callback transformer\n     * @param {Object} object - The object to transform\n     * @returns {Object} The transformed object\n     */\n\n    /**\n     * A collection of transformers to execute once the main document has been\n     * resolved. Each transformer will receive the main document as the first\n     * parameter.\n     * @type {transformer[]}\n     */\n    mainDocumentTransformers: [],\n\n    /**\n     * A collection of transformers to execute for each resource once it has been\n     * resolved. Each transformer will receive a resource as the first parameter.\n     * @type {transformer[]}\n     */\n    resourceTransformers: []\n}\n```\n\n## Testing\n\nTo run the tests, use the following command:\n\n```shell\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnesk%2Fserialison","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnesk%2Fserialison","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnesk%2Fserialison/lists"}