All Projects → pitiphong-p → URLQueryItemEncoder

pitiphong-p / URLQueryItemEncoder

Licence: MIT License
A Swift Encoder for encoding any Encodable value into an array of URLQueryItem.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to URLQueryItemEncoder

Use Query Params
React Hook for managing state in URL query parameters with easy serialization.
Stars: ✭ 1,278 (+2030%)
Mutual labels:  url, query
uri-query-parser
a parser and a builder to work with URI query string the right way in PHP
Stars: ✭ 38 (-36.67%)
Mutual labels:  url, query
go-qs
A Go port of Rack's query string parser
Stars: ✭ 96 (+60%)
Mutual labels:  url, query
sqrs
🚌SQRS is a JavaScript library for implementing CQRS pattern.
Stars: ✭ 23 (-61.67%)
Mutual labels:  query
go-query
⚡ Blazingly fast query engine
Stars: ✭ 16 (-73.33%)
Mutual labels:  query
utils.js
👷 🔧 zero dependencies vanilla JavaScript utils.
Stars: ✭ 14 (-76.67%)
Mutual labels:  url
Re-skinning url splitter
Divide / Split your WordPress Blog visitors into 4 links by using Re-skinning URL splitter
Stars: ✭ 73 (+21.67%)
Mutual labels:  url
SVT-AV1-GUI
GUI for SVT-AV1
Stars: ✭ 32 (-46.67%)
Mutual labels:  encoder
Minecraft-Server-Status
✅一个用于显示服务器在线信息及其他内容的网站
Stars: ✭ 22 (-63.33%)
Mutual labels:  query
pytextcodifier
📦 Turn your text files into codified images or your codified images into text files.
Stars: ✭ 14 (-76.67%)
Mutual labels:  encoder
node-google-polyline
Encode / decode Google's polyline format
Stars: ✭ 35 (-41.67%)
Mutual labels:  encoder
ocaml-uri
RFC3986 URI parsing library for OCaml
Stars: ✭ 85 (+41.67%)
Mutual labels:  url
Query-Tool
The QueryTool is a library that allows easier and faster connections with Postgres databases. Whit it, you can make insertions, selections, updates and deletions in the database in a simple and effective way.
Stars: ✭ 28 (-53.33%)
Mutual labels:  query
web-clipper
Easily download the main content of a web page in html, markdown, and/or epub format from command line.
Stars: ✭ 15 (-75%)
Mutual labels:  url
searchable
Pattern-matching search and reusable queries in laravel.
Stars: ✭ 28 (-53.33%)
Mutual labels:  query
flame-explain
A PostgreSQL EXPLAIN ANALYZE visualizer with advanced quirk correction algorithms.
Stars: ✭ 30 (-50%)
Mutual labels:  query
linqjs
use linq and lambda in javascript on es6, can use linq function in an Object or an Array or a String value | 一个方便对数组、字典、树形数据进行操作、筛选等操作的工具库
Stars: ✭ 17 (-71.67%)
Mutual labels:  query
TIL
Today I Learned
Stars: ✭ 43 (-28.33%)
Mutual labels:  query
mctools
Minecraft Connection Tools - Python implementations of common Minecraft protocols.
Stars: ✭ 27 (-55%)
Mutual labels:  query
jellex
TUI to filter JSON and JSON Lines data with Python syntax
Stars: ✭ 41 (-31.67%)
Mutual labels:  query

URLQueryItemEncoder

Platform Swift support CocoaPods Compatible Carthage compatible Swift Package Manager compatible Twitter

A Swift Encoder for encoding any Encodable value into an array of URLQueryItem. As part of the SE-0166, Swift has a foundation for any type to define how its value should be archived. This encoder allows you to encode those value into an array of URLQueryItem which represent that value in one command.

struct Language {
  let name: String
  let age: Int
}

let person = Language(name: "Swift", age: 4)
let encoder = URLQueryItemEncoder()
let items = try encoder.encode(person)
// items == [URLQueryItem(name: "name", value: "Swift"), URLQueryItem(name: "age", value: "4")]

Requirements

  • iOS 8+
  • macOS 10.10+
  • Swift 4.0+

Installation

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].