Athena is a library that provides type-safe APIs for working with JSON objects in Swift. It provides an idiomatic solution that is both faster and easier to use than Foundation's JSONSerialization
API. It takes advantage of modern Swift language features, and provides APIs for easily creating, mutating, serializing, and deserializing JSON values. It also provides a system to easily encode other Swift types into a JSON representation and decode those same types from correctly shaped JSON values.
Athena is based on Freddy, an early library for working with JSON in Swift that is no longer maintained by its original authors. The library itself has no non-Apple dependencies, but the package does use the SwiftFormat and DocC Swift Package Manager plugins.
Athena currently distributed exclusively through the Swift Package Manager.
To add Athena as a dependency to an existing Swift package, add the following line of code to the dependencies
parameter of your Package.swift
file:
dependencies: [
.package(url: "https://github.com/vsanthanam/Athena.git", .upToNextMajor(from: "0.0.0"))
]
To add Athena as a dependency to an Xcode Project:
- Choose
File
→Add Packages...
- Enter package URL
https://github.com/vsanthanam/Athena.git
and select your release and of choice.
Other distribution mechanisms like CocoaPods or Carthage may be added in the future.
Athena's documentation is built with DocC and included in the repository as a DocC archive. The latest version is hosted on GitHub Pages and is available here.
Additional installation instructions are available on the Swift Package Index
Explore the documentation for more details.
Athena is available under the MIT license. See the LICENSE file for more information.