SWON

main

Swift Object Notation
harlanhaskins/SWON

SWON

Swift Object Notation

This is a proof of concept for Swift Object Notation (.swon), a data interchange format similar to JSON, except with Swift syntax.

SomeFile.swon

[
    "hello": "world",
    "this": ["is", "SWON"],
    "its": [
        "aNewEncodingFormat": ["that", "uses"],
        "swift": ["as", "the", "interchange", "format"]
    ],
    "productionReady": false,
    "support": nil,
    "bugs": 1_000_000
]

Why?

This is not a serious project. Much of it is Codable boilerplate and a very simple and inefficient parser built on top of SwiftSyntax.

Usage

SWON vends SWONEncoder and SWONDecoder classes, similar to JSONEncoder and JSONDecoder. It's intended to work as closely to JSON Codable as possible, without many of the configuration features and niceties.

Author

Harlan Haskins (harlan@harlanhaskins.com)

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

Last updated: Wed May 14 2025 16:07:26 GMT-0900 (Hawaii-Aleutian Daylight Time)