{"id":20877225,"url":"https://github.com/badu/json","last_synced_at":"2026-04-19T21:37:09.510Z","repository":{"id":144933096,"uuid":"132425220","full_name":"badu/json","owner":"badu","description":"Standard \"encoding/json\" package arranged for my needs","archived":false,"fork":false,"pushed_at":"2018-11-13T04:24:21.000Z","size":360,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-19T09:31:56.551Z","etag":null,"topics":["golang","json"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"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/badu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-05-07T07:44:24.000Z","updated_at":"2018-11-13T04:24:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ef4433f-ca38-4877-9080-b3fc87de2d8d","html_url":"https://github.com/badu/json","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badu%2Fjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badu%2Fjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badu%2Fjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badu%2Fjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badu","download_url":"https://codeload.github.com/badu/json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243251033,"owners_count":20261134,"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":["golang","json"],"created_at":"2024-11-18T06:56:23.199Z","updated_at":"2025-12-26T21:48:29.987Z","avatar_url":"https://github.com/badu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Json\n\nStandard Go \"encoding/json\" package with a few enhancements. \n\nLast updated : 22nd of June 2018\n\n# Removed features\n\n* TextUnmarshaler and TextMarshaler \n\n# New features\n\n* fewer allocations - benchmarks are present\n* encode state is the options carrier, instead of passing around options as parameter\n* optional sort map keys on serializing\n* encoding and decoding of Null typed structs (NullString, NullBool, etc.) - see TestNewNull in encode_test.go for the Marshalers and TestNewDecodeNull in decode_test.go\n* minimal reflect, extracted from reflect package \n* fast number scanner in strconv - numbers are already validated on decoding, so there is no need to validate (to be described)\n* minimal strconv package included - instead of working with strings we're working with []byte (to be described)\n* fixed omitempty struct bug : \n\n```go\n    type (\n\t\t// note that all fields are omit empty\n\t\tEmptyStruct struct {\n\t\t\tId   int64  `json:\"id,omitempty\"`\n\t\t\tName string `json:\"name,omitempty\"`\n\t\t\tBool bool   `json:\"bool,omitempty\"`\n\t\t}\n\n\t\tTest struct {\n\t\t\tId       uint64      `json:\"id\"`\n\t\t\tMyStruct EmptyStruct `json:\"myStruct,omitempty\"` // and this one is marked as omit empty\n\t\t}\n\t)\n\t// the result should not contain \"myStruct\":{} - but it does\n\ttester := \u0026Test{Id: 3}\n\tresult, err := json.Marshal(tester)\n```\n\nThe result is `{\"id\":3}` not `{\"id\":3,\"myStruct\":{}}`.\n\n# Possible Known Issues\n\n* Working with maps : when using Marshal with maps, developers should make sure that the map doesn't change. \nFor allocation reasons, I have removed the code that was copying map's key and value before reading it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadu%2Fjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadu%2Fjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadu%2Fjson/lists"}