{"id":18673077,"url":"https://github.com/vicanso/superjson","last_synced_at":"2026-04-29T15:36:40.562Z","repository":{"id":57482158,"uuid":"168797768","full_name":"vicanso/superjson","owner":"vicanso","description":"json picker and converter","archived":false,"fork":false,"pushed_at":"2023-01-08T03:26:29.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-27T19:44:34.898Z","etag":null,"topics":["camelcase","json","json-omit","json-pick","snakecase"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/vicanso.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":"2019-02-02T05:24:52.000Z","updated_at":"2023-09-02T11:35:01.000Z","dependencies_parsed_at":"2023-02-08T04:32:02.188Z","dependency_job_id":null,"html_url":"https://github.com/vicanso/superjson","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fsuperjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fsuperjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fsuperjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicanso%2Fsuperjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vicanso","download_url":"https://codeload.github.com/vicanso/superjson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239513379,"owners_count":19651322,"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":["camelcase","json","json-omit","json-pick","snakecase"],"created_at":"2024-11-07T09:13:56.121Z","updated_at":"2025-11-06T23:30:24.352Z","avatar_url":"https://github.com/vicanso.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# super json\n\n[![Build Status](https://github.com/vicanso/superjson/workflows/Test/badge.svg)](https://github.com/vicanso/superjson/actions)\n\n\nJSON picker and converter.\n\n# API\n\n## Pick\n\n```go\nbuf := []byte(`{\n  \"name\": \"tree.xie\",\n  \"address\": \"GZ\",\n  \"no\": 123\n}`)\ndata := superjson.Pick(buf, []string{\n  \"name\",\n  \"no\",\n})\n// {\"name\":\"tree.xie\",\"no\":123}\nfmt.Println(string(data))\n```\n\n## Omit\n\n```go\nbuf := []byte(`{\n  \"name\": \"tree.xie\",\n  \"address\": \"GZ\",\n  \"no\": 123\n}`)\ndata := superjson.Omit(buf, []string{\n  \"address\",\n})\n// {\"name\":\"tree.xie\",\"no\":123}\nfmt.Println(string(data))\n```\n\n## Filter\n\n```go\nbuf := []byte(`{\n  \"name\": \"tree.xie\",\n  \"address\": \"GZ\",\n  \"no\": 123\n}`)\ndata := superjson.Filter(buf, func(key, _ string) (omit bool, newKey string) {\n  // omit the no\n  if key == \"no\" {\n    return true, \"\"\n  }\n  // convert the address to addr\n  if key == \"address\" {\n    return false, \"addr\"\n  }\n  // key original\n  return false, key\n})\n// {\"name\":\"tree.xie\",\"addr\":\"GZ\"}\nfmt.Println(string(data))\n```\n\n## Mask\n\n```go\nbuf := []byte(`{\n  \"name\": \"tree.xie\",\n  \"address\": \"GZ\",\n  \"no\": 123\n}`)\ndata := superjson.Mask(buf, func(key, _ string) (newValue string) {\n  // mask the no\n  if key == \"no\" {\n    return `\"***\"`\n  }\n  return \"\"\n})\n// {\"name\":\"tree.xie\",\"address\":\"GZ\",\"no\":\"***\"}\nfmt.Println(string(data))\n```\n\n\n## CamelCase\n\n```go\nbuf := []byte(`{\n\t\"book_author_name\": \"tree.xie\",\n\t\"book_no\": 123\n}`)\ndata := superjson.CamelCase(buf)\n// {\"bookAuthorName\":\"tree.xie\",\"bookNo\":123}\nfmt.Println(string(data)\n```\n\n## SnakeCase\n\n```go\nbuf := []byte(`{\n  \"bookAuthorName\": \"tree.xie\",\n  \"bookNo\": 123\n}`)\ndata := superjson.SnakeCase(buf)\n// {\"book_author_name\":\"tree.xie\",\"book_no\":123}\nfmt.Println(string(data))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicanso%2Fsuperjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvicanso%2Fsuperjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicanso%2Fsuperjson/lists"}