{"id":37892957,"url":"https://github.com/gumeniukcom/golang-jsonrpc2","last_synced_at":"2026-01-16T16:57:39.263Z","repository":{"id":57487637,"uuid":"173780216","full_name":"gumeniukcom/golang-jsonrpc2","owner":"gumeniukcom","description":"Library JSONRPC2.0 for golang","archived":false,"fork":false,"pushed_at":"2019-11-15T11:22:25.000Z","size":52,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T21:07:11.084Z","etag":null,"topics":["easyjson","golang","gomod","jsonrpc2"],"latest_commit_sha":null,"homepage":"","language":"Go","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/gumeniukcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-04T16:23:33.000Z","updated_at":"2022-09-05T10:26:02.000Z","dependencies_parsed_at":"2022-08-29T10:11:32.546Z","dependency_job_id":null,"html_url":"https://github.com/gumeniukcom/golang-jsonrpc2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gumeniukcom/golang-jsonrpc2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gumeniukcom%2Fgolang-jsonrpc2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gumeniukcom%2Fgolang-jsonrpc2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gumeniukcom%2Fgolang-jsonrpc2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gumeniukcom%2Fgolang-jsonrpc2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gumeniukcom","download_url":"https://codeload.github.com/gumeniukcom/golang-jsonrpc2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gumeniukcom%2Fgolang-jsonrpc2/sbom","scorecard":{"id":449233,"data":{"date":"2025-08-11","repo":{"name":"github.com/gumeniukcom/golang-jsonrpc2","commit":"39c5ba2dd66f5b1d4c0b6b785076dd8a3bb736f7"},"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":"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":"Code-Review","score":0,"reason":"Found 0/10 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":"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":"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: 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 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"}},{"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-19T07:44:10.402Z","repository_id":57487637,"created_at":"2025-08-19T07:44:10.403Z","updated_at":"2025-08-19T07:44:10.403Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"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":["easyjson","golang","gomod","jsonrpc2"],"created_at":"2026-01-16T16:57:39.169Z","updated_at":"2026-01-16T16:57:39.241Z","avatar_url":"https://github.com/gumeniukcom.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# golang-jsonrpc2\n\nImplementation for JSON-RPC2 protocol\n\nFull specification: https://www.jsonrpc.org/specification\n\n\n# HTTP example\n\n## Server\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\n\tjrpc \"github.com/gumeniukcom/golang-jsonrpc2\"\n)\n\nfunc main() {\n\n\tserv := jrpc.New()\n\n\tif err := serv.RegisterMethod(\"sum\", sum); err != nil {\n\t\tpanic(err)\n\t}\n\n\thttp.HandleFunc(\"/\", func(w http.ResponseWriter, r *http.Request) {\n\t\tctx := context.Background()\n\t\tbody, err := ioutil.ReadAll(r.Body)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tdefer r.Body.Close()\n\n\t\tw.Header().Set(\"Content-Type\", \"applicaition/json\")\n\t\tw.WriteHeader(http.StatusOK)\n\t\tif _, err = w.Write(serv.HandleRPCJsonRawMessage(ctx, body)); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t})\n\n\tif err := http.ListenAndServe(\":8088\", nil); err != nil {\n\t\tpanic(err)\n\t}\n}\n\ntype income struct {\n\tA int `json:\"a\"`\n\tB int `json:\"b\"`\n}\ntype outcome struct {\n\tSum int `json:\"sum\"`\n}\n\nfunc sum(ctx context.Context, data json.RawMessage) (json.RawMessage, int, error) {\n\tif data == nil {\n\t\treturn nil, jrpc.InvalidRequestErrorCode, fmt.Errorf(\"empty request\")\n\t}\n\tinc := \u0026income{}\n\terr := json.Unmarshal(data, inc)\n\tif err != nil {\n\t\treturn nil, jrpc.InvalidRequestErrorCode, err\n\t}\n\n\tC := outcome{\n\t\tSum: inc.A + inc.B,\n\t}\n\n\tmdata, err := json.Marshal(C)\n\tif err != nil {\n\t\treturn nil, jrpc.InternalErrorCode, err\n\t}\n\treturn mdata, jrpc.OK, nil\n}\n```\n\n## Request\n\n\n```bash\ncurl -d '{\"jsonrpc\":\"2.0\", \"id\":\"qwe\", \"method\":\"sum\", \"params\":{\"a\":5, \"b\":3}}' -H \"Content-Type: application/json\" -X POST http://localhost:8088/\n``` \n## Response\n\n```json\n{\"jsonrpc\":\"2.0\",\"result\":{\"sum\":8},\"id\":\"qwe\"}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgumeniukcom%2Fgolang-jsonrpc2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgumeniukcom%2Fgolang-jsonrpc2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgumeniukcom%2Fgolang-jsonrpc2/lists"}