{"id":21614187,"url":"https://github.com/hemantsonu20/json-merge","last_synced_at":"2026-04-07T05:31:49.763Z","repository":{"id":40303420,"uuid":"289265363","full_name":"hemantsonu20/json-merge","owner":"hemantsonu20","description":"A light weight library to merge two json objects into a single json object.","archived":false,"fork":false,"pushed_at":"2026-03-30T12:04:29.000Z","size":273,"stargazers_count":7,"open_issues_count":1,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-30T14:10:32.030Z","etag":null,"topics":["hacktoberfest","hacktoberfest2020","java","json","json-merge","maven"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hemantsonu20.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-08-21T12:33:42.000Z","updated_at":"2026-03-30T12:04:34.000Z","dependencies_parsed_at":"2023-02-16T06:15:58.236Z","dependency_job_id":null,"html_url":"https://github.com/hemantsonu20/json-merge","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/hemantsonu20/json-merge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantsonu20%2Fjson-merge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantsonu20%2Fjson-merge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantsonu20%2Fjson-merge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantsonu20%2Fjson-merge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hemantsonu20","download_url":"https://codeload.github.com/hemantsonu20/json-merge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hemantsonu20%2Fjson-merge/sbom","scorecard":{"id":461048,"data":{"date":"2025-08-11","repo":{"name":"github.com/hemantsonu20/json-merge","commit":"cbd0c649003bfccbc5b17d360a05862c668d0486"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/21 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":"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":"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":"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":"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/maven-master.yml:1","Warn: no topLevel permission defined: .github/workflows/maven-pr.yml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven-master.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/hemantsonu20/json-merge/maven-master.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven-master.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/hemantsonu20/json-merge/maven-master.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven-pr.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/hemantsonu20/json-merge/maven-pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven-pr.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/hemantsonu20/json-merge/maven-pr.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"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":"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: Apache License 2.0: 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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h46c-h94j-95f3","Warn: Project is vulnerable to: GHSA-wf8f-6423-gfxg","Warn: Project is vulnerable to: GHSA-3x8x-79m2-3w2w","Warn: Project is vulnerable to: GHSA-57j2-w4cx-62h2","Warn: Project is vulnerable to: GHSA-jjjh-jjxp-wpff","Warn: Project is vulnerable to: GHSA-rgv9-q543-rqg4"],"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-19T11:09:01.761Z","repository_id":40303420,"created_at":"2025-08-19T11:09:01.761Z","updated_at":"2025-08-19T11:09:01.761Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31501903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["hacktoberfest","hacktoberfest2020","java","json","json-merge","maven"],"created_at":"2024-11-24T22:07:09.156Z","updated_at":"2026-04-07T05:31:49.754Z","avatar_url":"https://github.com/hemantsonu20.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Java CI with Maven](https://github.com/hemantsonu20/json-merge/workflows/Java%20CI%20with%20Maven/badge.svg)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.hemantsonu20/json-merge.svg?label=Maven%20Central\u0026color=brightgreen)](https://search.maven.org/search?q=g:%22com.github.hemantsonu20%22%20AND%20a:%22json-merge%22)\n[![javadoc](https://javadoc.io/badge2/com.github.hemantsonu20/json-merge/javadoc.svg?v=2.0.0)](https://javadoc.io/doc/com.github.hemantsonu20/json-merge)\n\n# json-merge\nA light weight library to merge two json objects into a single json object.\n\n## Overview\nThis library merges two json of any nested level into a single json following below logic.\n\n* When keys are different, both keys with there values will be copied at same level.\n* When keys are same at some level, following table denotes what value will be used.\n\n    | Src / Target           | JSON Value       | JSON Array        | JSON Object       |\n    |----------------------- |------------------|-------------------|-------------------|\n    | JSON Value\u003csup\u003e1\u003c/sup\u003e | Src              | Src               | Src               |\n    | JSON Array             | Src\u003csup\u003e2\u003c/sup\u003e  | Merge             | Src               |\n    | JSON Object            | Src              | Src               | Merge\u003csup\u003e3\u003c/sup\u003e |\n    \n    \u003csup\u003e**1**\u003c/sup\u003e Json Value denotes boolean, number or string value in json.  \n    \u003csup\u003e**2**\u003c/sup\u003e Src denotes `Src` value will be copied.  \n    \u003csup\u003e**3**\u003c/sup\u003e Merge denotes both `Src` and `Target` values will be merged.\n    \n## Maven Artifact\nTo use this library add below to your dependencies in `pom.xml`.\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.hemantsonu20\u003c/groupId\u003e\n  \u003cartifactId\u003ejson-merge\u003c/artifactId\u003e\n  \u003cversion\u003e2.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\nThis library exposes below method. It accepts source and target json and returns the merged json.\n```java\npublic static String merge(String srcJsonStr, String targetJsonStr);\n```\n\n**Method Usage**\n```java\nString srcJsonStr = \"{\\\"name\\\":\\\"json-merge\\\"}\";\nString targetJsonStr = \"{\\\"age\\\":18}\";\nString output = JsonMerge.merge(srcJsonStr, targetJsonStr);\n// {\"name\":\"json-merge\",\"age\":18}\n```\n\n## Examples\n#### Example 1\n**Source Json**\n```json\n{\n  \"name\": \"json-merge-src\"\n}\n```\n**Target Json**\n```json\n{\n  \"name\": \"json-merge-target\"\n}\n```\n**Output**\n```json\n{\n  \"name\": \"json-merge-src\"\n}\n```\n#### Example 2\n**Source Json**\n```json\n{\n  \"level1\": {\n    \"key1\": \"SrcValue1\"\n  }\n}\n```\n**Target Json**\n```json\n{\n  \"level1\": {\n    \"key1\": \"targetValue1\",\n    \"level2\": {\n      \"key2\": \"value2\"\n    }\n  }\n}\n```\n  \n**Output Json**\n```json\n{\n  \"level1\": {\n    \"key1\": \"SrcValue1\",\n    \"level2\": {\n      \"key2\": \"value2\"\n    }\n  }\n}\n```\n\nFor more examples see, [test json files](/src/test/resources/json-merge-test).   \n\u003csmall\u003eEach test json file contains a json array of three json objects, first is src, second is target and third is output json.\u003c/small\u003e\n\n## Documentation\n* Javadoc Releases are available at [javadoc.io](https://javadoc.io/doc/com.github.hemantsonu20/json-merge). (See javadoc badge above)\n* Javadoc for latest code available via github pages [here](https://hemantsonu20.github.io/json-merge/apidocs/).\n\n## Contributing\n[See Contributing Guidelines](/CONTRIBUTING.md)\n\n## License\n[Apache License Version 2.0](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemantsonu20%2Fjson-merge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhemantsonu20%2Fjson-merge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhemantsonu20%2Fjson-merge/lists"}