Swiftpack.co - elegantchaos/JSONExtensions as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by elegantchaos.
elegantchaos/JSONExtensions v1.0.3
Additional JSON utilities for Swift.
⭐️ 0
🕓 3 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/elegantchaos/JSONExtensions.git", from: "v1.0.3")

JSONExtensions

Some minor supporting utilities for Swift JSON parsing.

Error Translation

Adds isJSONError and jsonErrorDescription to Error, which provide a way to test for JSON parsing errors, and a better description of them.

JSONSerialization

Adds a convenience method to decode direct from a String.

Adds convenience decoding methods which don't throw, but instead take an error handler. The error handler is passed the thrown error, but also a pre-formatted description of the error, produced by jsonErrorDescription.

GitHub

link
Stars: 0
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics