{"id":13413272,"url":"https://github.com/sinhashubham95/jsonic","last_synced_at":"2026-01-26T06:31:24.224Z","repository":{"id":55104712,"uuid":"328089663","full_name":"sinhashubham95/jsonic","owner":"sinhashubham95","description":"All you need with JSON","archived":false,"fork":false,"pushed_at":"2021-01-15T08:00:58.000Z","size":26,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T20:52:05.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/sinhashubham95.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":"2021-01-09T06:21:59.000Z","updated_at":"2023-12-26T18:23:37.000Z","dependencies_parsed_at":"2022-08-14T12:10:13.246Z","dependency_job_id":null,"html_url":"https://github.com/sinhashubham95/jsonic","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sinhashubham95/jsonic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinhashubham95%2Fjsonic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinhashubham95%2Fjsonic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinhashubham95%2Fjsonic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinhashubham95%2Fjsonic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinhashubham95","download_url":"https://codeload.github.com/sinhashubham95/jsonic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinhashubham95%2Fjsonic/sbom","scorecard":{"id":827184,"data":{"date":"2025-08-11","repo":{"name":"github.com/sinhashubham95/jsonic","commit":"ce3f9dde4351789c49747d3fa32b1f4d62e51971"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"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":"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":"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":"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":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/sinhashubham95/jsonic/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/sinhashubham95/jsonic/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/sinhashubham95/jsonic/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/sinhashubham95/jsonic/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/sinhashubham95/jsonic/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/sinhashubham95/jsonic/go.yml/master?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/go.yml:67","Warn: downloadThenRun not pinned by hash: .github/workflows/go.yml:29","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   2 downloadThenRun dependencies pinned","Info:   2 out of   2 goCommand 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.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":"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":-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":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq"],"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-23T16:50:36.739Z","repository_id":55104712,"created_at":"2025-08-23T16:50:36.739Z","updated_at":"2025-08-23T16:50:36.739Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28768335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:54:34.369Z","status":"ssl_error","status_checked_at":"2026-01-26T03:54:33.031Z","response_time":59,"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":[],"created_at":"2024-07-30T20:01:36.577Z","updated_at":"2026-01-26T06:31:24.192Z","avatar_url":"https://github.com/sinhashubham95.png","language":"Go","readme":"# JSONIC\n\n[![GoDoc](https://godoc.org/github.com/sinhashubham95/jsonic?status.svg)](https://pkg.go.dev/github.com/sinhashubham95/jsonic)\n[![Release](https://img.shields.io/github/v/release/sinhashubham95/jsonic?sort=semver)](https://github.com/sinhashubham95/jsonic/releases)\n[![Report](https://goreportcard.com/badge/github.com/sinhashubham95/jsonic)](https://goreportcard.com/report/github.com/sinhashubham95/jsonic)\n[![Coverage Status](https://coveralls.io/repos/github/sinhashubham95/jsonic/badge.svg?branch=master)](https://coveralls.io/github/sinhashubham95/jsonic?branch=master)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go#json)\n\n`Jsonic` is the complete set of utilities to handle json data. There's no need to define structs anymore. It's completely safe to perform nested queries in the JSON. The strong typed methods part of this library will help you have the desired result without writing any extra code.\n\n## Installation\n\n```shell\ngo get github.com/sinhashubham95/jsonic\n```\n\n## Understanding the query path\n\n`Jsonic` uses a unique and simple way to query the elements in a json. It's easy but unique, so you need to understand the same for using `Jsonic`.\n\nConsider the following json.\n\n```json\n{\n  \"a\": {\n    \"x\": \"p\",\n    \"arr\": [\n      {\n        \"a\": \"b\",\n        \"c.d\": {\n          \"e\": \"f\"\n        }\n      }\n    ]\n  },\n  \"c\": \"d\",\n  \"a.x\": {\n    \"y\": \"q\"\n  },\n  \"a.x.y\": {\n    \"z\": \"r\"\n  }\n}\n```\n\nThough, practically such a JSON won't exist, but still `Jsonic` is intelligent enough to handle even this. Go through the below table carefully and it will help you understand the path schema.\n\n|      Path      |                         Result                         | Comments                                                                  |\n| :------------: | :----------------------------------------------------: | ------------------------------------------------------------------------- |\n| {EMPTY_STRING} |                      entire json                       | empty string returns the entire json if no empty string exists in the key |\n|       .        |                      entire json                       | dot returns the entire json if no dot exists in the key                   |\n|       a        | {\"x\": \"p\", \"arr\": [{ \"a\": \"b\", \"c.d\": { \"e\": \"f\" } }]} | it returns the entire json tree of a                                      |\n|      a.x       |                           p                            | multiple options here, but the first preference goes to the tree of a     |\n|     a.x.y      |                           q                            | multiple options here, the first preference will be given to a.x          |\n|    a.x.y.z     |                           r                            | there is only a single possibility here                                   |\n|     a.arr      |          [{ \"a\": \"b\", \"c.d\": { \"e\": \"f\" } }]           | it returns the entire array denoting the json tree of a.arr               |\n|    a.arr[0]    |           { \"a\": \"b\", \"c.d\": { \"e\": \"f\" } }            | it returns the first element of the array                                 |\n|   a.arr[0].a   |                           b                            | it returns the element for key a of the first element of array            |\n| a.arr[0].c.d.e |                           f                            |                                                                           |\n\nAs you would have understood, if there are multiple JSON trees satisfying the path, and the path looks something like this `a.b.c.d`, then the preferences will be in the following order - `a` \u003e `a.b` \u003e `a.b.c` \u003e `a.b.c.d`.\n\nConsider another json.\n\n```json\n{\n  \"\": \"a\",\n  \".\": \"b\"\n}\n```\nHere the paths resolve in a different manner.\n\n|      Path      | Result | Comments                                                                  |\n| :------------: | :----: | ------------------------------------------------------------------------- |\n| {EMPTY_STRING} |   a    | empty string returns the entire json if no empty string exists in the key |\n|       .        |   b    | empty string returns the entire json if no empty string exists in the key |\n\n## How to Use?\n\n`Jsonic` allows you to process the JSON bytes. You can create a new instance of `Jsonic` for every JSON you have and you can get the child JSON trees using the set of utilities it provides.\n\n### Create a New Instance\n\nThis will create a new instance using the JSON bytes provided as it's data to be used on.\n\n```go\nimport (\n  \"github.com/sinhashubham95/jsonic\"\n)\n\nfunc New() {\n  json := \"{\\\"naruto\\\": \\\"rocks\\\"}\"\n  j, err := jsonic.New([]byte(json))\n  // perform any sort of operations on the json using the instance created\n}\n```\n\n### Create a child instance\n\nOn the `Jsonic` created, you can provide a child path and get a new instance with the child JSON tree satisfying the path provided as it's data.\n\n```go\nimport (\n  \"github.com/sinhashubham95/jsonic\"\n)\n\nfunc Child() {\n  json := \"{\\\"naruto\\\": \\\"rocks\\\"}\"\n  j, err := jsonic.New([]byte(json))\n  if err != nil {\n    return\n  }\n  \n  // create a child\n  child, err := jsonic.Child(\"naruto\")\n  // now if you want to query on the child then use this child instance\n}\n```\n\n### Get the data at the path\n\nOn the `Jsonic` created, you can get the data at the path specified.\n\n```go\nimport (\n  \"github.com/sinhashubham95/jsonic\"\n)\n\nfunc Get() {\n  json := \"{\\\"naruto\\\": \\\"rocks\\\"}\"\n  j, err := jsonic.New([]byte(json))\n  if err != nil {\n    return\n  }\n  \n  // get the data\n  data, err := jsonic.Get(\"naruto\")\n  // this data will have type interface{} with value \"rocks\"\n}\n```\n\n### Get typed data at the path\n\nThough using structs is not required with the wonderful set of utilities `Jsonic` provides, but even if you like to use that, it is very simple to get your result cast into the struct you want.\n\n```go\nimport (\n  \"github.com/sinhashubham95/jsonic\"\n)\n\ntype Detail struct {\n  Name string `json:\"name\"`\n}\n\nfunc GetTyped() {\n  json := \"{\\\"characters\\\": [{\\\"name\\\": \\\"naruto\\\"}, {\\\"name\\\": \\\"boruto\\\"}]}\"\n  j, err := jsonic.New([]byte(json))\n  if err != nil {\n    return\n  }\n  \n  // get the data\n  var data []Detail\n  err := jsonic.GetTyped(\"characters\", \u0026data)\n  // this data will contain 2 elements with names as naruto and boruto\n}\n```\n\n### Other Typed Utilities\n\nApart from the generic query methods mentioned above, `Jsonic` contains a bunch of others.\n\n```go\nimport (\n  \"github.com/sinhashubham95/jsonic\"\n)\n\nfunc OtherGetters(j *Jsonic, path string) {\n  // primitives\n  i, err := j.GetInt(path)                    // int\n  i64, err := j.GetInt64(path)                // int64\n  f, err := j.GetFloat(path)                  // float32\n  f64, err := j.GetFloat64(path)              // float64\n  b, err := j.GetBool(path)                   // bool\n  s, err := j.GetString(path)                 // string\n\n  // arrays\n  a, err := j.GetArray(path)                  // []interface{}\n  iArr, err := j.GetIntArray(path)            // []int\n  i64Arr, err := j.GetInt64Array(path)        // []int64\n  fArr, err := j.GetFloatArray(path)          // []float32\n  f64Arr, err := j.GetFloat64Array(path)      // []float64\n  bArr, err := j.GetBoolArray(path)           // []bool\n  sArr, err := j.GetStringArray(path)         // []string\n\n  // maps\n  m, err := j.GetMap(path)                    // map[string]interface{}\n  iMap, err := j.GetIntMap(path)              // map[string]int\n  i64Map, err := j.GetInt64Map(path)          // map[string]int64\n  fMap, err := j.GetFloatMap(path)            // map[string]float32\n  f64Map, err := j.GetFloat64Map(path)        // map[string]float64\n  bMap, err := j.GetBoolMap(path)             // map[string]bool\n  sMap, err := j.GetStringMap(path)           // map[string]string\n}\n```\n","funding_links":[],"categories":["Relational Databases","JSON"],"sub_categories":["Search and Analytic Databases","检索及分析资料库","Advanced Console UIs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinhashubham95%2Fjsonic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinhashubham95%2Fjsonic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinhashubham95%2Fjsonic/lists"}