{"id":24901762,"url":"https://github.com/antonsjava/jmom","last_synced_at":"2026-05-01T01:31:30.928Z","repository":{"id":57732437,"uuid":"222542440","full_name":"antonsjava/jmom","owner":"antonsjava","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-15T20:35:20.000Z","size":25,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T16:55:12.587Z","etag":null,"topics":["json","json-manipulation"],"latest_commit_sha":null,"homepage":null,"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/antonsjava.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":"2019-11-18T20:53:07.000Z","updated_at":"2022-02-04T09:58:14.000Z","dependencies_parsed_at":"2022-09-10T19:52:20.343Z","dependency_job_id":null,"html_url":"https://github.com/antonsjava/jmom","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antonsjava/jmom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonsjava%2Fjmom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonsjava%2Fjmom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonsjava%2Fjmom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonsjava%2Fjmom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonsjava","download_url":"https://codeload.github.com/antonsjava/jmom/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonsjava%2Fjmom/sbom","scorecard":{"id":199753,"data":{"date":"2025-08-11","repo":{"name":"github.com/antonsjava/jmom","commit":"6784fcbae1c8902e79c200efe648dc7ece452801"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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/6 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":"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: 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":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-16T22:36:35.915Z","repository_id":57732437,"created_at":"2025-08-16T22:36:35.915Z","updated_at":"2025-08-16T22:36:35.915Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32482460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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-manipulation"],"created_at":"2025-02-01T21:17:41.744Z","updated_at":"2026-05-01T01:31:30.893Z","avatar_url":"https://github.com/antonsjava.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# jmom\n\n Mom is woman, which tries to modify her son to be nicer.\n\n jmom is java library, which tries to modify json to be nicer.\n\n## Base of usage\n\n The library is based on antonsjava.[json](https://github.com/antonsjava/json) library, which is base for json\n manipulation. Json data are provided as instances of json API.\n\n Creating json API object from String.\n```java\n  String jsonvalue = .....\n  JsonValue json = JsonParser.parse(jsonvalue);\n```\n Creating jmom API object for manipulating json.\n```java\n  Jmom jmom = Jmom.instance()\n            .xxxxx() //a modification rule\n            .xxxxx() //a modification rule\n            .xxxxx() //a modification rule\n            ;\n```\n Modifying json using jmom API.\n```java\n  jmom.apply(json);\n```\n Converting json back to String.\n```java\n  String newjsonvalue = json.toCompactString();\n```\n\n## Json data pointers\n\n Modification rules from Jmom API must address some parts of json to be modified.\n The library uses WildPathMatcher syntax for addressing subparts of json.\n Individual path elements can be\n  - simple names like \"foo\", \"bar\"\n  - wild names like \"foo-*\", \"bar-?\" \n  - \"**\" for representing sequence of path elements\t \n\n So pointers can look like\n  - \"/foo/bar/item\" represents only \"/foo/bar/item\"\n  - \"/foo/*/item\" represents paths like \"/foo/bar/item\", \"/foo/nobar/item\", ....\n  - \"/foo/**/item\" represents paths like \"/foo/item\", \"/foo/bar/item\", \"/foo/bar/bar/item\"....\n\n Data pointer can be postfixed with '|{int number}'. It moves path selected jsno node to parent \n {int number} times. For example \"**/config\" selects all paths which ends with '/config' but \n \"**/config|1\" selects direct parents of previous selections.\n\n## Modification rules\n\n### Add\n\n Add rule allows to add specified json value to given json. It has following parameters\n  - path - exact path where new json must be inserted. (no wilds are allowed here)\n  - jsonvalue - value tu be inserted into json\n  - replace - true is old value should be replaced is exists. (default: false)\n\n Examples:\n```java\n   Jmom jmom = Jmom.instance()\n     .add(\"/menu/name\", JsonFactory.stringLiteral(\"nove mneo\"), true)\n     .add(\"/menu/popup/menuitem/2\", JsonParser.parse(\"{\\\"value\\\": \\\"SaveAs\\\", \\\"onclick\\\": \\\"SaveAs()\\\"}\"), true)\n   ;\n```\n\n### Remove\n\n Remove rule allows to remove specified parts from given json. It has following parameters\n  - path - list of data pointers exact path where new json must be inserted.\n\n Examples:\n```java\n   Jmom jmom = Jmom.instance()\n     .remove(\"/menu/name-?\", \"**/config|1\")\n   ;\n```\n\n### KeepOnly\n\n KeepOnly rule allows to remove all parts from given json except specified. It has following parameters\n  - path - list of data pointers exact path where new json must be saved.\n\n Examples:\n```java\n   Jmom jmom = Jmom.instance()\n     .keepOnly(\"/menu/name-?\", \"**/config|1\")\n   ;\n```\n### Copy\n\n Copy rule allows to copy specified json part to different place of json. It has following parameters\n  - frompath - path which must be copied. (first part is used if more can be identified)\n  - topath - exact path where from json must be inserted. (no wilds are allowed here)\n  - move - true is old part should be deleted (default: false)\n\n Examples:\n```java\n   Jmom jmom = Jmom.instance()\n     .copy(\"/menu/id\", \"/menu/ctx/id\", true)\n   ;\n```\n\n### Apply\n\n Apply rule allows to apply a rule on chosen subparts of given json. The rule can be \n anything. \n  - rule - any rule to be aplied.\n  - path - list of data pointers exact path where rule must be applied\n\n Example: (for each objects containing \"street\" attribute create new one \"streetFull\" )\n```java\n   Jmom jmom = Jmom.instance()\n     .apply((json) -\u003e {\n                String street = json.asObject().first(\"street\");\n                String streetnum = json.asObject().first(\"streetNo\");\n                json.asObject().attr(\"streetFull\", street+\" \"+streetNo);\n            }, \"**/street|1\")\n   ;\n```\n\n## Maven usage\n\n```\n   \u003cdependency\u003e\n      \u003cgroupId\u003eio.github.antonsjava\u003c/groupId\u003e\n      \u003cartifactId\u003ejmom\u003c/artifactId\u003e\n      \u003cversion\u003eLASTVERSION\u003c/version\u003e\n   \u003c/dependency\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonsjava%2Fjmom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonsjava%2Fjmom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonsjava%2Fjmom/lists"}