Swiftpack.co -  griffin-stewie/LTSV.swift as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
griffin-stewie/LTSV.swift
LTSV Decoder / Encoder written in Swift
.package(url: "https://github.com/griffin-stewie/LTSV.swift.git", from: "v0.1.0")

LTSV.swift

LTSV Decoder / Encoder written in Swift

Installation

LTSV.swift requires Xcode 12.4 or a Swift 5.3+ toolchain with the Swift Package Manager

Swift Package Manager

// dependencies
.package(url: "https://github.com/griffin-stewie/LTSV.swift", .upToNextMinor(from: "0.1.0")),
// target.dependencies
.product(name: "LTSV", package: "LTSV.swift")

CococaPods

I won't support it.

Carthage

I won't support it.

Usage

LTSV.swift supports Codable types.

import Foundation
import LTSV

struct Model: Codable {
    let label1: String
    let label2: String
}

let string = "label1:value1\tlabel2:value2"

let decoder = LTSVDecoder()
let model = try decoder.decode(Model.self, from: string)

let encoder = LTSVEncoder()
let result = try encoder.encode(model)

print(result)
// label1:value1\tlabel2:value2

It supports lines of LTSV strings into Array of Codable type as well.

License

MIT licensed.

GitHub

link
Stars: 0
Last commit: 4 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

v0.1.0
4 days ago

First release

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