This repository includes some useful tools for Codable protocol and data decoding.
Usage
PlainCodingKey
Simple CodingKey struct.
Type reflection for Decodable types
let properties: [String: Any.Type] = Mirror.reflect(SomeType.self)
//or Mirror(SomeType.self).children
Tools for creating custom encoders/decoders
Based on similar logic when writing different encoders/decoders DecodingUnboxer and EncodingBoxer protocols were implemented.
Examples of usage are all encoders in decoders in this repo.
SimpleCoders
Description
This repository includes some useful tools for
Codable
protocol and data decoding.Usage
PlainCodingKey
Simple
CodingKey
struct.Decodable
typesBased on similar logic when writing different encoders/decoders
DecodingUnboxer
andEncodingBoxer
protocols were implemented. Examples of usage are all encoders in decoders in this repo.Installation
Create a
Package.swift
file.Add the following line to your Podfile:
and run
pod update
from the podfile directory first.Author
Voidilov, voidilov@gmail.com
License
VDCodable is available under the MIT license. See the LICENSE file for more info.