{"id":19842860,"url":"https://github.com/kerelape/cjson","last_synced_at":"2025-05-01T20:31:57.274Z","repository":{"id":152047005,"uuid":"625238640","full_name":"kerelape/cjson","owner":"kerelape","description":"an object-oriented JSON library for Go","archived":false,"fork":false,"pushed_at":"2023-04-13T09:30:38.000Z","size":50,"stargazers_count":5,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T17:23:32.186Z","etag":null,"topics":["go","golang","immutability","json","library","oop"],"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/kerelape.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2023-04-08T13:49:59.000Z","updated_at":"2023-04-13T09:40:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"156edb73-16dd-4404-9b5c-6f4fc089ba70","html_url":"https://github.com/kerelape/cjson","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerelape%2Fcjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerelape%2Fcjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerelape%2Fcjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerelape%2Fcjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kerelape","download_url":"https://codeload.github.com/kerelape/cjson/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251940873,"owners_count":21668627,"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","golang","immutability","json","library","oop"],"created_at":"2024-11-12T12:35:53.361Z","updated_at":"2025-05-01T20:31:57.267Z","avatar_url":"https://github.com/kerelape.png","language":"Go","readme":"\u003c!-- \nMIT License\n\nCopyright (c) 2023 kerelape\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE. \n--\u003e\n# Convenient JSON\n\nConvenient JSON (cjson) is a highly inspired by [eo-json](https://github.com/objectionary/eo-json), object-oriented JSON library for Go (golang).\n\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n\n[![Build](https://github.com/kerelape/cjson/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/kerelape/cjson/actions/workflows/build.yml)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/kerelape/cjson/blob/main/LICENSE.txt)\n\n## How to use this library\n\n### Add `cjson` to your Go module\n\n```bash\n$ go get -u github.com/kerelape/cjson\n```\n\n### Build JSON\n\n```go\npackage main\n\nimport (\n    \"encoding/json\"\n\n    cjson \"github.com/kerelape/cjson/pkg\"\n)\n\nfunc main() {\n    object := cjson.NewObject().With(\"key\", cjson.NewString(\"value\"))\n    bytes, err := json.Marshal(object)\n    if err != nil {\n        panic(err)\n    }\n    println(string(bytes))\n}\n```\n\n### Parse JSON\n\n```go\npackage main\n\nimport (\n    \"encoding/json\"\n\n    cjson \"github.com/kerelape/cjson/pkg\"\n)\n\nfunc main() {\n    root, err := cjson.NewDocument([]byte(`{\"a\":\"b\"}`)).Parse()\n    if err != nil {\n        panic(err)\n    }\n    println(root.Object().Value().Found(\"a\").Value().String().Value().Content())\n}\n```\n\n## How to Contribute\n\nFork this repository, make changes, send us a pull request. We will review your changes and apply them to the `main` branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run the tests:\n\n```bash\n$ go test -v ./...\n```\n\nYou will need Go 1.20+.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerelape%2Fcjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkerelape%2Fcjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerelape%2Fcjson/lists"}