Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jnordberg/swift-query-string-coder
Standards compliant query string encoder & decoder for Swift's Codable protocol
https://github.com/jnordberg/swift-query-string-coder
codable decoding encoding swift
Last synced: 22 days ago
JSON representation
Standards compliant query string encoder & decoder for Swift's Codable protocol
- Host: GitHub
- URL: https://github.com/jnordberg/swift-query-string-coder
- Owner: jnordberg
- License: other
- Created: 2020-05-10T16:13:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T11:53:12.000Z (over 4 years ago)
- Last Synced: 2024-10-19T04:04:26.466Z (25 days ago)
- Topics: codable, decoding, encoding, swift
- Language: Swift
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# swift-query-string-coder
Standards compliant query string encoder & decoder for the `Codable` protocol.
```swift
struct MyQuery: Codable {
let hello: String
let tags: [String]
let flag: Bool
}let encoder = QueryStringEncoder()
let query = MyQuery(hello: "world™", tags: ["foo", "bar"], flag: true)
let result = try encoder.encode(query)
print(result) // hello=world%E2%84%A2&tags=foo&tags=bar&flag
```TODO
- [x] Encoder
- [ ] Decoder