Skip to content
Norman Basham edited this page Feb 17, 2020 · 3 revisions

Data

Source


Decode Data with let pet: pet = data.decode(). View Data as a string with data.asString

Codable Models

Encode a model with let data = pet.encode(). You can optionally include a isPretty parameter to format the JSON. Model dates are automatically iso8601 encoded.

View a model as JSON with pet.jsonString.

Clone this wiki locally