{"id":22594855,"url":"https://github.com/avi-d-coder/grep_json_deserialize","last_synced_at":"2026-05-14T21:04:49.276Z","repository":{"id":57634304,"uuid":"155806215","full_name":"Avi-D-coder/grep_json_deserialize","owner":"Avi-D-coder","description":"A parser for the output of ripgrep --json","archived":false,"fork":false,"pushed_at":"2018-11-22T05:30:39.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T02:44:56.337Z","etag":null,"topics":["deserialization","json","ripgrep","serde","serialization"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/Avi-D-coder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-02T02:56:10.000Z","updated_at":"2018-11-22T05:30:41.000Z","dependencies_parsed_at":"2022-09-16T04:01:21.512Z","dependency_job_id":null,"html_url":"https://github.com/Avi-D-coder/grep_json_deserialize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Avi-D-coder/grep_json_deserialize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avi-D-coder%2Fgrep_json_deserialize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avi-D-coder%2Fgrep_json_deserialize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avi-D-coder%2Fgrep_json_deserialize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avi-D-coder%2Fgrep_json_deserialize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Avi-D-coder","download_url":"https://codeload.github.com/Avi-D-coder/grep_json_deserialize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avi-D-coder%2Fgrep_json_deserialize/sbom","scorecard":{"id":18228,"data":{"date":"2025-08-11","repo":{"name":"github.com/Avi-D-coder/grep_json_deserialize","commit":"e45783cd6e03545f2eba0fb1a9bc0787e3e89311"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/14 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":"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":-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":"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":"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":"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":"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"}},{"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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 2 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"}}]},"last_synced_at":"2025-08-14T16:14:22.308Z","repository_id":57634304,"created_at":"2025-08-14T16:14:22.308Z","updated_at":"2025-08-14T16:14:22.308Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33043251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["deserialization","json","ripgrep","serde","serialization"],"created_at":"2024-12-08T10:07:49.812Z","updated_at":"2026-05-14T21:04:49.249Z","avatar_url":"https://github.com/Avi-D-coder.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### Deserialization for the output of [grep_printer::JSON](https://docs.rs/grep-printer/0.1.1/grep_printer/struct.JSON.html).\nCreated to deserialize `ripgrep` `--json` output for [rg_replace](https://github.com/Avi-D-coder/rg_replace).\nPowered by [serde](https://serde.rs/).\n\n#### Cargo.toml:\n\n```toml\n[dependencies]\ngrep_json_deserialize = \"0.1.2\"\nserde_json = \"1.0.32\"\n```\n\n#### main.rs\n\n```rust\nuse std::process::Command;\n\nextern crate grep_json_deserialize as deserialize;\nuse deserialize::{ArbitraryData::*, Type::*, *};\n\nfn main() {\n    // grep_json always puts out valid UTF-8\n    // let out = String::from_utf8(Command::new(\"rg\").arg(\"main\").output().unwrap().stdout).unwrap();\n    let out = r#\"{\"type\":\"begin\",\"data\":{\"path\":{\"text\":\"src/main.rs\"}}}\n{\"type\":\"match\",\"data\":{\"path\":{\"text\":\"src/main.rs\"},\"lines\":{\"text\":\"fn main() {\\n\"},\"line_number\":6,\"absolute_offset\":129,\"submatches\":[{\"match\":{\"text\":\"main\"},\"start\":3,\"end\":7}]}}\n{\"type\":\"match\",\"data\":{\"path\":{\"text\":\"src/main.rs\"},\"lines\":{\"text\":\"    let out = String::from_utf8(Command::new(\\\"rg\\\").arg(\\\"main\\\").output().unwrap().stdout).unwrap();\\n\"},\"line_number\":8,\"absolute_offset\":186,\"submatches\":[{\"match\":{\"text\":\"main\"},\"start\":56,\"end\":60}]}}\n{\"type\":\"end\",\"data\":{\"path\":{\"text\":\"src/main.rs\"},\"binary_offset\":null,\"stats\":{\"elapsed\":{\"secs\":0,\"nanos\":12208,\"human\":\"0.000012s\"},\"searches\":1,\"searches_with_match\":1,\"bytes_searched\":447,\"bytes_printed\":521,\"matched_lines\":2,\"matches\":2}}}\n{\"data\":{\"elapsed_total\":{\"human\":\"0.002971s\",\"nanos\":2971130,\"secs\":0},\"stats\":{\"bytes_printed\":521,\"bytes_searched\":447,\"elapsed\":{\"human\":\"0.000012s\",\"nanos\":12208,\"secs\":0},\"matched_lines\":2,\"matches\":2,\"searches\":1,\"searches_with_match\":1}},\"type\":\"summary\"}\"#;\n\n    let deserialized: Vec\u003cType\u003e = out\n        .lines()\n        .map(|line| serde_json::from_str(line).unwrap())\n        .collect();\n\n    assert_eq!(deserialized,\n    vec![\n    Begin {\n        path: Text {\n        text: \"src/main.rs\".to_owned()\n    }\n    },\n    Match {\n        path: Text {\n            text: \"src/main.rs\".to_owned()\n        }, lines: Text {\n            text: \"fn main() {\\n\".to_owned()\n        }, line_number: Some(6), absolute_offset: 129,\n            submatches: vec![SubMatch {\n                matched: Text {\n                    text: \"main\".to_owned()\n                }, start: 3, end: 7 }]\n    },\n    Match {\n        path: Text {\n            text: \"src/main.rs\".to_owned()\n        }, lines: Text {\n            text: \"    let out = String::from_utf8(Command::new(\\\"rg\\\").arg(\\\"main\\\").output().unwrap().stdout).unwrap();\\n\".to_owned()\n        }, line_number: Some(8),\n            absolute_offset: 186,\n            submatches: vec![SubMatch { matched: Text { text: \"main\".to_owned()\n            },\n                start: 56,\n                end: 60\n            }]\n    },\n    End {\n        path: Text {\n            text: \"src/main.rs\".to_owned()\n        },\n        binary_offset: None,\n        stats: Stats {\n            elapsed: Duration {\n                secs: 0,\n                nanos: 12208,\n                human: \"0.000012s\".to_owned()\n            }, searches: 1,\n            searches_with_match: 1,\n            bytes_searched: 447,\n            bytes_printed: 521,\n            matched_lines: 2,\n            matches: 2 } },\n            Summary {\n                elapsed_total:\n                    Duration {\n                        secs: 0,\n            nanos: 2971130,\n            human: \"0.002971s\".to_owned() },\n            stats: Stats {\n                elapsed:\n                    Duration {\n                        secs: 0,\n            nanos: 12208,\n            human: \"0.000012s\".to_owned() },\n            searches: 1,\n            searches_with_match: 1,\n            bytes_searched: 447,\n            bytes_printed: 521,\n            matched_lines: 2,\n            matches: 2 } }]);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favi-d-coder%2Fgrep_json_deserialize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favi-d-coder%2Fgrep_json_deserialize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favi-d-coder%2Fgrep_json_deserialize/lists"}