Install TOON for Swift

TOON is available in multiple languages. Choose your preferred ecosystem and start integrating TOON into your projects today.

Community

Installation

Add the official TOONEncoder package to your project

.package(url: "https://github.com/mattt/TOONEncoder.git", from: "0.0.1")

Usage Example

Quick start guide for encoding and decoding TOON format in Swift

import TOONEncoder
let encoder = TOONEncoder()
let data = try! encoder.encode(myObject)

No code needed to try it: paste data into the JSON to TOON converter, compare token counts in the TOON token calculator, or read the TOON format guide.