{"id":20752034,"url":"https://github.com/1swaraj/gojson","last_synced_at":"2025-04-28T13:34:16.246Z","repository":{"id":47232055,"uuid":"322816244","full_name":"1swaraj/GoJSON","owner":"1swaraj","description":"Parsing JSON is a hassle in golang. This package will allow you to parse and search elements in a json without structs.","archived":false,"fork":false,"pushed_at":"2021-09-07T19:29:06.000Z","size":51,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T10:05:17.269Z","etag":null,"topics":["go","gojson","gojsons","golang","json","json-parser","parse","struct"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1swaraj.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-19T09:59:08.000Z","updated_at":"2023-09-10T13:03:41.000Z","dependencies_parsed_at":"2022-09-08T00:11:30.311Z","dependency_job_id":null,"html_url":"https://github.com/1swaraj/GoJSON","commit_stats":null,"previous_names":["swaraj1802/gojson"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1swaraj%2FGoJSON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1swaraj%2FGoJSON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1swaraj%2FGoJSON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1swaraj%2FGoJSON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1swaraj","download_url":"https://codeload.github.com/1swaraj/GoJSON/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251320224,"owners_count":21570543,"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","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":["go","gojson","gojsons","golang","json","json-parser","parse","struct"],"created_at":"2024-11-17T08:39:37.742Z","updated_at":"2025-04-28T13:34:16.186Z","avatar_url":"https://github.com/1swaraj.png","language":"Go","readme":"# GoJSON\nParsing JSON is a hassle in golang. This package will allow you to parse and search elements in a json without structs.\n\n## Install gojson\ngo get github.com/swaraj1802/GoJSON/gojson\n\n## Usage\n\nImport\n```go\nimport \"github.com/swaraj1802/GoJSON/gojson\"\n```\n\nSample Code\n```go\njsonParsed, err := gojson.ParseJSON([]byte(`{\n   \"glossary\":{\n      \"title\":\"example glossary\",\n      \"GlossDiv\":{\n         \"title\":\"S\",\n         \"GlossList\":{\n            \"GlossEntry\":{\n               \"ID\":\"SGML\",\n               \"SortAs\":\"SGML\",\n               \"GlossTerm\":\"Standard Generalized Markup Language\",\n               \"Acronym\":\"SGML\",\n               \"Abbrev\":\"ISO 8879:1986\",\n               \"GlossDef\":{\n                  \"para\":\"A meta-markup language, used to create markup languages such as DocBook.\",\n                  \"GlossSeeAlso\":[\n                     \"GML\",\n                     \"XML\"\n                  ]\n               },\n               \"GlossSee\":\"markup\"\n            }\n         }\n      }\n   }\n}`))\nif err != nil {\n   panic(err)\n}\nvalue, ok := jsonParsed.Search(\"glossary\", \"GlossDiv\", \"title\")\nif ok != nil {\n  panic(errors.New(\"Element doesn't exist\"))\n}\noutput := value.JSONData()\nfmt.Println(output)\n```\n\n\n\nGithub Actions Enabled\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1swaraj%2Fgojson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1swaraj%2Fgojson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1swaraj%2Fgojson/lists"}