{"id":20590874,"url":"https://github.com/alickbass/lucjson","last_synced_at":"2026-05-02T01:34:26.511Z","repository":{"id":89935331,"uuid":"84545093","full_name":"alickbass/LucJSON","owner":"alickbass","description":"Pure swift JSON Serialization","archived":false,"fork":false,"pushed_at":"2017-03-14T15:10:52.000Z","size":34,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-02T01:34:26.051Z","etag":null,"topics":["json","json-parser","jsonserializer"],"latest_commit_sha":null,"homepage":null,"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/alickbass.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,"publiccode":null,"codemeta":null}},"created_at":"2017-03-10T09:51:15.000Z","updated_at":"2017-03-14T15:20:46.000Z","dependencies_parsed_at":"2023-05-30T14:30:37.918Z","dependency_job_id":null,"html_url":"https://github.com/alickbass/LucJSON","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alickbass/LucJSON","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alickbass%2FLucJSON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alickbass%2FLucJSON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alickbass%2FLucJSON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alickbass%2FLucJSON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alickbass","download_url":"https://codeload.github.com/alickbass/LucJSON/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alickbass%2FLucJSON/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32520156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"ssl_error","status_checked_at":"2026-05-02T01:12:54.261Z","response_time":64,"last_error":"SSL_read: 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":["json","json-parser","jsonserializer"],"created_at":"2024-11-16T07:38:33.684Z","updated_at":"2026-05-02T01:34:26.503Z","avatar_url":"https://github.com/alickbass.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LucJSON\nLuc JSON is a library that uses [JSONSerialization's](https://github.com/apple/swift-corelibs-foundation/blob/master/Foundation/NSJSONSerialization.swift) implementation, but replaces all the `Any` and uses `JSON` type.\n\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) \n[![codecov](https://codecov.io/gh/alickbass/LucJSON/branch/master/graph/badge.svg)](https://codecov.io/gh/alickbass/LucJSON)\n[![Build Status](https://travis-ci.org/alickbass/LucJSON.svg?branch=master)](https://travis-ci.org/alickbass/LucJSON)\n\n## Why remove Any?\n\nThe fact that `JSONSerialization` returns `Any` is the biggest lie ever, as [JSON](http://www.json.org) defines explicitly what can be represented as `JSON` and what cannot. That is why `JSON` in this library is the following `enum`:\n\n```swift\nenum JSON {\n    case null\n    case number(NSNumber)\n    case bool(Bool)\n    case string(String)\n    case object([String: JSON])\n    case array([JSON])\n}\n```\n\n**Moreover, there is also performance implications when using `Any`**:\n\nWhenever you do the following:\n\n```swift\nlet json: Any = //JSON from the JSONSerialization\nlet object: [String: Any]? = json as? [String: Any]\n```\n\nIt has to go through the whole object, to make sure that all the keys are `String`. Which is `O(n)` time complexity where `n` is the number of keys in the `JSON` object.\n\nIn the `LucJSON` we achieve with the following code:\n\n```swift\nlet json: JSON = //JSON from the JSON.Serialization\nlet object: [String: JSON]? = json.object\n```\n\nAs the `JSON` is `enum` it is now accomplished with a regular case check and there is no need to go through all the keys, as the keys can only be `String` in the `enum`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falickbass%2Flucjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falickbass%2Flucjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falickbass%2Flucjson/lists"}