{"id":36829702,"url":"https://github.com/lens-vm/jsonmerge","last_synced_at":"2026-01-12T14:11:20.929Z","repository":{"id":57573752,"uuid":"352327912","full_name":"lens-vm/jsonmerge","owner":"lens-vm","description":"A TinyGo supported implementation of the JSON Merge spec based on json-patch \u0026 fastjson.","archived":false,"fork":false,"pushed_at":"2022-11-15T10:51:47.000Z","size":21,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-12-05T13:57:16.152Z","etag":null,"topics":["json","json-merge-patch","tinygo","wasm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lens-vm.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":"2021-03-28T12:49:50.000Z","updated_at":"2023-07-07T16:44:09.000Z","dependencies_parsed_at":"2022-09-26T19:01:32.957Z","dependency_job_id":null,"html_url":"https://github.com/lens-vm/jsonmerge","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/lens-vm/jsonmerge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-vm%2Fjsonmerge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-vm%2Fjsonmerge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-vm%2Fjsonmerge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-vm%2Fjsonmerge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lens-vm","download_url":"https://codeload.github.com/lens-vm/jsonmerge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-vm%2Fjsonmerge/sbom","scorecard":{"id":584328,"data":{"date":"2025-08-11","repo":{"name":"github.com/lens-vm/jsonmerge","commit":"91ae88d1bfffc713d72f66f5b8073143f0b42ab5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity 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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab 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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T20:01:33.694Z","repository_id":57573752,"created_at":"2025-08-20T20:01:33.694Z","updated_at":"2025-08-20T20:01:33.694Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"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":["json","json-merge-patch","tinygo","wasm"],"created_at":"2026-01-12T14:11:20.178Z","updated_at":"2026-01-12T14:11:20.919Z","avatar_url":"https://github.com/lens-vm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON Merge Patch\r\nA `JSON Merge Patch` utility forked from [json-patch](https://github.com/evanphx/json-patch) and based on [fastjson](github.com/valyala/fastjson), with WASM/WASI support for [TinyGo](https://tinygo.org/).\r\n\r\n## Wasm Support\r\nThe TinyGo compiler doesn't support `encoding/json` or some of the `reflect` package that most JSON serializers are based on.\r\n\r\nLuckily `valyala/fastjson` is a native go implementation that doesn't rely on `encoding/json` and only uses the supported `reflect` functions.\r\n\r\nTherefore this package is a TinyGo compliant library for `JSON Merge Patch`.\r\n\r\n## Usage\r\nPublic Functions:\r\n- `MergePatch(doc, merge) -\u003e doc` : Applies a MergePatch to a JSON document and returns the new doc.\r\n- `MergeMergePatch(merge, merge) -\u003e merge` : Merges two Merge Patch documents into a single.\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\r\n\t\"github.com/lens-vm/jsonmerge\"\r\n)\r\n\r\nfunc main() {\r\n\t// Let's create a merge patch and a original document...\r\n\toriginal := []byte(`{\"name\": \"John\", \"age\": 24, \"height\": 3.21}`)\r\n\tmerge := []byte(`{\"name\": \"Jane\", \"age\": 21}`)\r\n\r\n\tnew, err := jsonpatch.MergePatch(original, merge)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tfmt.Printf(\"new merged document:   %s\\n\", new)\r\n\t// outputs {{\"name\": \"Jane\", \"age\": 21, \"height\": 3.21}}\r\n}\r\n```\r\n\r\n## Roadmap\r\nCurrently this project succesfully passes much of the [JSON Merge RFC Tests](https://tools.ietf.org/html/rfc7386) for applying merges to 1. Documents 2. Other Merges.\r\n\r\nNext steps is to support creating a Merge from the diff of two existing JSON Docs. This is suppported in the orignal `evanphx/json-patch` library, but the changes haven't made its way here.\r\n\r\n## IMPORTANT\r\nThis library is an adaptation of / based on [evanphx/json-patch](https://github.com/evanphx/json-patch). The goal of this fork is to replace the original libraries dependancy on `encoding/json` with `valyala/fastjson`. The original license (BSD 3-Clause) is maintained, and the original copyright is maintained in the unchanged files.\r\n\r\n## Contributors\r\n- John-Alan Simmons ([@jsimnz](https://github.com/jsimnz))\r\n- Evan Pheonix ([@evanphx](https://github.com/evanphx)) (Original Fork)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flens-vm%2Fjsonmerge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flens-vm%2Fjsonmerge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flens-vm%2Fjsonmerge/lists"}