{"id":17034107,"url":"https://github.com/theolampert/jsvaluecoder","last_synced_at":"2026-04-29T11:03:47.557Z","repository":{"id":173280018,"uuid":"640163762","full_name":"theolampert/JSValueCoder","owner":"theolampert","description":"A Codable implementation for JavascriptCore's JSValue","archived":false,"fork":false,"pushed_at":"2024-03-07T13:05:00.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T21:42:45.643Z","etag":null,"topics":["codable","javascript","javascriptcore","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/theolampert.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-05-13T07:32:31.000Z","updated_at":"2024-03-16T13:00:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb19cb85-a675-44ef-9a5d-49dc9193ad7e","html_url":"https://github.com/theolampert/JSValueCoder","commit_stats":null,"previous_names":["theolampert/jsvaluecoder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theolampert/JSValueCoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theolampert%2FJSValueCoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theolampert%2FJSValueCoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theolampert%2FJSValueCoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theolampert%2FJSValueCoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theolampert","download_url":"https://codeload.github.com/theolampert/JSValueCoder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theolampert%2FJSValueCoder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32422552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["codable","javascript","javascriptcore","swift"],"created_at":"2024-10-14T08:37:25.950Z","updated_at":"2026-04-29T11:03:47.541Z","avatar_url":"https://github.com/theolampert.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"### JSValueCoder\n\n![Test](https://github.com/theolampert/JSValueCoder/actions/workflows/swift.yml/badge.svg)\n\nCodable implementation for JavascriptCore's `JSValue`\n\nNote: This was written pre the `swift-foundation` project's adoption into macOS and iOS, JSON decoding was very slow and this library made more sense. If you're targeting newer platforms, you can probably just use JSONDecoder/Encoder.\n\n#### Usage:\n\n```swift\nlet context = JSContext()!\n\nstruct Note: Codable {\n    let id: Int\n}\n\nstruct User: Codable {\n    let id: String\n    let name: String\n    let score: Double\n}\n\nlet user = User(\n    id: \"7\",\n    name: \"John\",\n    score: 1.3,\n    note: Note(id: 1)\n)\n\nlet encoder = JSValueEncoder()\nlet decoder = JSValueDecoder()\n\nlet jsValue = try encoder.encode(user, in: context)\nlet decoded = try decoder.decode(User.self, from: jsValue)\n```\n\n#### Notes:\n\nThis was originally based off of work here https://github.com/byss/KBJSValueCoding with the following changes:\n\n- Support was added for nested structs\n- Support was added for arrays\n- Bug was fixed when decoding Bools\n- Bug was fixed when decoding with different key coding strategies\n- Tests added\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheolampert%2Fjsvaluecoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheolampert%2Fjsvaluecoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheolampert%2Fjsvaluecoder/lists"}