{"id":23169199,"url":"https://github.com/abrarnitk/sorted_json_keys","last_synced_at":"2025-08-18T07:30:54.453Z","repository":{"id":50591555,"uuid":"174016304","full_name":"AbrarNitk/sorted_json_keys","owner":"AbrarNitk","description":"Small Rust library to filter and sort the json.","archived":false,"fork":false,"pushed_at":"2025-02-10T10:46:22.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T06:56:01.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/AbrarNitk.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,"publiccode":null,"codemeta":null}},"created_at":"2019-03-05T20:31:23.000Z","updated_at":"2025-02-20T17:51:05.000Z","dependencies_parsed_at":"2024-10-29T12:10:59.091Z","dependency_job_id":null,"html_url":"https://github.com/AbrarNitk/sorted_json_keys","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"69958e57e28962d164cc5ab5ef7af9c729ee3e29"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AbrarNitk/sorted_json_keys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbrarNitk%2Fsorted_json_keys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbrarNitk%2Fsorted_json_keys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbrarNitk%2Fsorted_json_keys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbrarNitk%2Fsorted_json_keys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbrarNitk","download_url":"https://codeload.github.com/AbrarNitk/sorted_json_keys/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbrarNitk%2Fsorted_json_keys/sbom","scorecard":{"id":8032,"data":{"date":"2025-08-11","repo":{"name":"github.com/AbrarNitk/sorted_json_keys","commit":"4055b83f8aeb8a77eeea11c86e48ae39f8863b67"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/17 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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT 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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 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":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-14T13:59:17.289Z","repository_id":50591555,"created_at":"2025-08-14T13:59:17.290Z","updated_at":"2025-08-14T13:59:17.290Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270961439,"owners_count":24675914,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-12-18T03:16:00.393Z","updated_at":"2025-08-18T07:30:54.125Z","avatar_url":"https://github.com/AbrarNitk.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sorted_json_keys\n\nRust lib to sort JSON based on string keys and filter json values\n\nNote: \n\n- filter is working based on the keys\n- sorted is buggy, need improvements\n\n\n```rust\n\n#[cfg(test)]\nmod tests {\n    use crate::filter::keys::filter;\n    \n    #[test]\n    fn test_map_filter() {\n        let data: serde_json::Value = serde_json::json!({\n            \"foo\": \"bar\",\n            \"config\": {\n                \"foo-config\": \"bar\",\n                \"temp\": \"temppp\",\n                \"hector\": \"tractor\"\n            }\n        });\n\n        let filtered = filter(data, \u0026|key| {\n            vec![\"foo\", \"config.temp\", \"config.hector\"].contains(\u0026key)\n        });\n\n        let expected = serde_json::json!({\n          \"config\": {\n            \"hector\": \"tractor\",\n            \"temp\": \"temppp\"\n          },\n          \"foo\": \"bar\"\n        });\n\n        assert_eq!(expected, filtered);\n        // println!(\"value: {}\", serde_json::to_string_pretty(\u0026value).unwrap());\n    }\n\n    #[test]\n    fn test_list_filter() {\n        let data: serde_json::Value = serde_json::json!({\n            \"foo\": \"bar\",\n            \"config\": [\n                {\n                    \"foo-config\": \"bar\",\n                    \"temp\": \"temppp\",\n                    \"hector\": \"tractor\"\n                },\n                {\n                    \"foo-config\": \"bar1\",\n                    \"temp\": \"temppp1\",\n                    \"hector\": \"tractor1\"\n                }\n            ]\n        });\n\n        let expected = serde_json::json!({\n            \"foo\": \"bar\",\n            \"config\": [\n            {\n              \"hector\": \"tractor\",\n              \"temp\": \"temppp\"\n            },\n            {\n              \"hector\": \"tractor1\",\n              \"temp\": \"temppp1\"\n            }\n          ]\n        });\n\n        let filtered = filter(data, \u0026|key| {\n            vec![\"foo\", \"config.[].temp\", \"config.[].hector\"].contains(\u0026key)\n        });\n        assert_eq!(expected, filtered);\n    }\n\n    #[test]\n    fn filter_inner_list() {\n        let data: serde_json::Value = serde_json::json!({\n            \"foo\": \"bar\",\n            \"config\": [\n                {\n                    \"foo-config\": \"bar\",\n                    \"temp\": [{ \"a\": 1 }],\n                    \"hector\": \"tractor\"\n                },\n                {\n                    \"foo-config\": \"bar1\",\n                    \"temp\": [{ \"a\": 2 }],\n                    \"hector\": \"tractor1\"\n                }\n            ]\n        });\n\n        let filtered = filter(data, \u0026|key| key == \"config.[].temp.[].a\");\n\n        let expected: serde_json::Value = serde_json::json!({\n            \"config\": [\n                {\n                    \"temp\": [{ \"a\": 1 }],\n                },\n                {\n                    \"temp\": [{ \"a\": 2 }],\n                }\n            ]\n        });\n\n        assert_eq!(expected, filtered);\n\n        // println!(\"value: {}\", serde_json::to_string_pretty(\u0026filtered).unwrap());\n    }\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabrarnitk%2Fsorted_json_keys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabrarnitk%2Fsorted_json_keys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabrarnitk%2Fsorted_json_keys/lists"}