Analysis updated 2026-07-17 · repo last pushed 2024-07-16
Parse API JSON responses with compile-time type safety instead of Any.
Navigate deeply nested JSON with a single keypath subscript.
Convert between JSON and Swift types using Codable.
Replace loose [String:Any] dictionaries in an iOS or backend codebase.
| rogerluan/jsen | a9eelsh/heliocore | appdev/clipdock | |
|---|---|---|---|
| Stars | 13 | 13 | 13 |
| Language | Swift | Swift | Swift |
| Last pushed | 2024-07-16 | — | — |
| Maintenance | Dormant | — | — |
| Setup difficulty | easy | hard | moderate |
| Complexity | 2/5 | 3/5 | 2/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
JSEN is a lightweight library that gives Swift developers a safer way to work with JSON data. Instead of using the common but loose [String:Any] pattern, where you lose track of what type each value actually is, JSEN wraps JSON into a Swift enum that knows exactly what kind of data it holds: numbers, strings, booleans, nulls, arrays, or nested dictionaries. The benefit is you get compile-time safety and clearer code, with fewer runtime surprises when dealing with API responses or data parsing. At its core, JSEN is simple. It's just one enum with seven cases, one for each JSON value type. The library then adds convenient shortcuts so you don't have to write verbose boilerplate. You can write JSON structures using familiar Swift literal syntax (like ["key": "value", "count": 42]), and the library automatically converts those into JSEN values. For variables that aren't literals, there's a % prefix operator that quickly wraps any value into its JSEN form. It also supports the standard Swift Codable protocol, so converting between JSON and JSEN works smoothly in both directions. This is most useful for iOS, macOS, or backend developers who regularly parse JSON from APIs and want type safety without boilerplate. If you're tired of seeing Any in your codebase or constantly unwrapping optionals to navigate nested JSON structures, JSEN helps. The library also includes a convenient keypath-based subscript, so instead of chaining optionals to dig into nested data like response["user"]?["profile"]?["name"], you can write response[keyPath: "user.profile.name"] and get the value in one line. The project is deliberately minimal by design. It does one thing well: represent JSON in a type-safe way without requiring heavyweight frameworks or code generation. It runs on all Apple platforms (iOS, macOS, watchOS, tvOS) and Linux, and is installable as a Swift Package.
A lightweight Swift library that represents JSON as a type-safe enum, avoiding loose [String:Any] parsing and offering keypath access.
Mainly Swift. The stack also includes Swift, Swift Package Manager.
Dormant — no commits in 2+ years (last push 2024-07-16).
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.