Contents

pitiphong-p/urlqueryitemencoder

A Swift `Encoder` for encoding any `Encodable` value into an array of `URLQueryItem`. As part of the [SE-0166](https://github.com/apple/swift-evolution/blob/master/proposals/0166-swift-archival-serialization.md), Swift has a foundation for any type to define how its value should

Manually

This project comes with built in URLQueryItemEncoder framework target. You can drag URLQueryItemEncoder.xcproj file into your project, add URLQueryItemEncoder framework target as a target dependency and link/embed that framework. and Voila!!!

import URLQueryItemEncoder

Or you can copy the URLQueryItemEncoder.swift file into your project.

CocoaPods

Add the following to your Podfile

pod 'URLQueryItemEncoder'
use_frameworks!

Carthage

Add the following to your Cartfile

github "pitiphong-p/URLQueryItemEncoder"

Swift Package Manager

You can use Swift Package Manager and specify dependency in Package.swift by adding this:

dependencies: [
    .Package(url: "https://github.com/pitiphong-p/URLQueryItemEncoder.git", majorVersion: 0)
]

Usage

The URLQueryItemEncoder has a simple and familiar API. It has only 1 method for performing the encoding and 1 strategy for choosing how to encode the Array Index key.

let encoder = URLQueryItemEncoder()
let items = try encoder.encode(person)

Contact

Pitiphong Phongpattranont

License

URLQueryItemEncoder is released under an MIT License. Copyright © 2017-present Pitiphong Phongpattranont.

Package Metadata

Repository: pitiphong-p/urlqueryitemencoder

Default branch: master

README: README.md