Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

24 Commits

Repository files navigation

Codable

Helps you to throw an error on container request step, which is not allowed by the current Encodable design.

Package.swift

.package(url:"https://github.com/swiftstack/codable.git",.branch("dev"))

Usage

structEncoder:Swift.Encoder{func container<Key:CodingKey>(keyedBy type:Key.Type)->KeyedEncodingContainer<Key>{do{
// try
}catch{returnKeyedEncodingContainer(KeyedEncodingError(error))}}func unkeyedContainer()->UnkeyedEncodingContainer{do{
// try
}catch{returnEncodingError(error)}}func singleValueContainer()->SingleValueEncodingContainer{do{
// try
}catch{returnEncodingError(error)}}}

About

EncodingError for Codable protocols

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages